Error While Installing Cv2 In Pycharm - Python 3.5.3
Solution 1:
The package name is actually opencv-python
. So you should do:
pip install opencv-python
However, the package is only available on pypi for version 3, not for version 2. I think the misunderstanding could come from when you are actually importing the package you do:
`import cv2`
But that is actually not the package name on pypi. See the documentation on pypi for more details.
Solution 2:
In pycharm go to :
- File
- Settings
- Expand Project : [your project name]
- Select "project Interpreter"
In the top right corner of the grid listing the packages, click the green plus button A popup "Available packages" will appear
If no package is available in the list in the left, click the "Manage repositories" button, add this package URL (https://pypi.python.org/simple), then restart pycharm (You may also need to update pycharm to the lastest version, there was a bug here)
In the search box type "opencv-python"
Select the "opencv-python" package in the list and click the "Install Package" button in the bottom left of the popup
- Now go back to your code, it will no longer comply about the missing cv2
Solution 3:
Easy Way to go .. You can follow these steps:
- Open Settings in Pycharm.
- In Settings, on left there will be an option of Project: Your Project Name.
- Press it and then inside it click Project Interpreter.
- Now there will be a plus sign over right frame.
- Press that sign and write opencv-python and then install the package.
write import cv2 in your program to use it.
Post a Comment for "Error While Installing Cv2 In Pycharm - Python 3.5.3"