I want to use openCV and python for my work.
But unable to find matched compatible versions of python and openCV.
I tried using python version 3.7, 3.6, it did nor worked.
I want to know more about python vs openCV version compatibility.
Please help me out.
opencv supports python 3.7
Install python 3.7 with anaconda package and use this command to install opencv.
conda install -c menpo opencv
You can install the latest version of python (check here https://www.python.org/downloads/), along with pip3 (check here https://pip.pypa.io/en/stable/installing/)
Then for a specific version of OpenCV, for example the 4.1.2.30, you can run :
pip3 install opencv-python==4.1.2.30
Hope this helps.
Related
everyone.
My problem is that I need the last version of OpenCV (4.3.0) to run a code but when I checked my version of opencv with the line:
print(cv2.__version__)
it said that my version of cv2 is the 3.4.2. So I went into my anaconda, environment, I marked opencv for upgrade, but it seems it is the last version it can install. So I tried a command in the cmd.prompt of anaconda :
pip install --upgrade opencv-python==4.3.0.36
And then, when I checked "opencv" in the installed modules of my anaconda environment, I saw two opencv. One is "opencv" version 3.4.2, and then, just below, there is "opencv-pyton" version 4.3.0. BUT, when I checked again my version of cv2 with "print(cv2.version)", it was still telling me that my version is 3.4.2 (I also tried to uninstall the opencv 3.4.2 to see if anaconda would then take into account the opencv-pyton 4.3.0 but no, it gives me an error).
Does anyone have an idea how to upgrade my version of opencv with anaconda ? Thanks everyone.
You may be missing the conda-forge channel in your .condarc settings.
try this to install from conda-forge:
conda install -c conda-forge opencv=4.3.0
I tried installing opencv by going to setting>project>project interpreter but it is showing me error: "Could not find a version that satisfies the requirement opencv-python (from versions: )
No matching distribution found for opencv-python"
https://i.stack.imgur.com/PGCpG.png
From opencv-python
The latest version for python 3 is opencv 3.4.9:
Currently, builds for following Python versions are provided:
2.7
3.4
3.5
3.6
3.7
So you need to install python 3.7. PyCharm can work with multiple python versions so you don't need to uninstall 3.8.2
suggests to install Anaconda, Add a New Conda Environment for your Project, try to install openCV through Anaconda, if still failed, pls try to change other repository. My repository is "https://pypi.tuna.tsinghua.edu.cn/simple/", and I succeeded installing openCV
I downloaded the latest version of python, but when I go into the terminal and type the following Command:
Python --version
It returns Python 2.7.10
I have looked at tons of online tutorials and cannot figure out how to get my Mac to actually use the latest version of python that I installed.
Look into installing Homebrew.
It is a great package manager for macOS and does let you install new versions of python using its brew install command.
You can look at the installation details here: https://docs.brew.sh/Installation
brew install python3
python3 --version
Recently I used opencv Python to handle Video Steam.
Normally I should install opencv-python via pip.
However I found that the opencv-python in pypi is unofficial package.
And it's just a package with opencv core, which does NOT including packages like contrib and FFmpeg...
If you wanted a version of opencv with extra packages, you should possibly download the opencv source code and build your own Opencv Python Bindings.
For me, this is not a friendly way to manage Opencv compared to other python libs in pypi.
Does anyone have a more elegant way to manage opencv python in both Mac and Linux OS please?
if u have anaconda then just open anaconda prompt and you can try
conda install -c conda-forge opencv
or for opencv 3 version you can try
conda install -c menpo opencv3
The easies way to install opencv-python is link or this link.
pip install will just install opencv-core, which does not include FFmpeg lib...
I have installed 3.6.1 version of python interpreter. I have a project that need to use "PIL" library so I try to install it but it gives me error, "Error occurred when installing package 'PIL'". I search it out why it's happening and I think it can only be installed on lower version of interpreter 2.7 or something lower. Now how can I install PIL in 3.6.1 version of interpreter? Should I downgrade my interpreter instead? But if I do, can it cause some other packages to be unable to install for it is only for 3.X version. Thanks in advance.
Install Pillow, the packaged and maintained fork of PIL, using:
pip install pillow
download pillow based on your version. from python unofficial library ..
search pillow choose your python version and distribution from it... once you download,
move onto download path or
pip install ~/Downloads/Pillow‑4.2.1‑cp36‑cp36m‑win_amd64.whl