I realise there are a lot of similar questions on SO, and I have been browsing them but haven't found any success in their solutions so far.
I'm using:
- Anaconda 1.9.12
- Python 3.8.3
- Windows 10
I installed opencv by doing:
pip install opencv-python
When I do
conda list
I can see the following:
opencv 4.0.1 py38h2a7c758_0
opencv-python 4.3.0.36 pypi_0 pypi
opencv-python-headless 4.3.0.36 pypi_0 pypi
And also
py-opencv 4.0.1 py38he44ac1e_0
So it would seem that opencv is installed. However, when I'm writing python code and I have:
import cv2
I get the "Unable to import cv2" error.
This may have something to do with how Anaconda manages installations and environments, but I had thought everything was installed under my custom environment, since that's where I've been doing everything.
Note: I've also tried other commands such as
conda install -c conda-forge opencv
Which look like they succeed, but then I'm still getting the error.
