Skip to content

ModuleNotFoundError: No module named 'cv2' in opencv-4.0.0 and contrib-opencv-4.0.0 tags #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
f9n opened this issue Dec 22, 2018 · 0 comments

Comments

@f9n
Copy link
Contributor

f9n commented Dec 22, 2018

Hi,
I think these tags doesn't work correctly.

tags: opencv-4.0.0, contrib-opencv-4.0.0

$ docker container run -it jjanzic/docker-python3-opencv:opencv-4.0.0 python 
Unable to find image 'jjanzic/docker-python3-opencv:opencv-4.0.0' locally
opencv-4.0.0: Pulling from jjanzic/docker-python3-opencv
54f7e8ac135a: Already exists 
d6341e30912f: Already exists 
087a57faf949: Already exists 
5d71636fb824: Already exists 
0c1db9598990: Already exists 
bfb904e99f24: Already exists 
78a3d3a96a32: Already exists 
885a0ed92c89: Already exists 
dd7cc9ace242: Already exists 
a24a072f8608: Pull complete 
a64f3f9c9555: Pull complete 
4212a3a34e29: Pull complete 
Digest: sha256:cf8c2f8a00c9bdc35ade7894bfa8f68b70434f4534d097ec0ea4069134f47784
Status: Downloaded newer image for jjanzic/docker-python3-opencv:opencv-4.0.0
Python 3.7.1 (default, Nov 16 2018, 22:26:09) 
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cv2'
$ docker container run -it jjanzic/docker-python3-opencv:contrib-opencv-4.0.0 python
Unable to find image 'jjanzic/docker-python3-opencv:contrib-opencv-4.0.0' locally
contrib-opencv-4.0.0: Pulling from jjanzic/docker-python3-opencv
54f7e8ac135a: Already exists 
d6341e30912f: Already exists 
087a57faf949: Already exists 
5d71636fb824: Already exists 
0c1db9598990: Already exists 
bfb904e99f24: Already exists 
78a3d3a96a32: Already exists 
885a0ed92c89: Already exists 
dd7cc9ace242: Already exists 
a07329d466c4: Pull complete 
57e9858ba364: Pull complete 
64f7b9be4e22: Pull complete 
2ffe99e25909: Pull complete 
Digest: sha256:de9bd86415472aabbdec81ef2295e57baeb8525a4e40d3d4c3cca16d98bcb0d8
Status: Downloaded newer image for jjanzic/docker-python3-opencv:contrib-opencv-4.0.0
Python 3.7.1 (default, Nov 16 2018, 22:26:09) 
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cv2'

Thanks gorogoroyasu for this pull request.
The solution worked for me.

$ docker container run -it jjanzic/docker-python3-opencv:contrib-opencv-4.0.0 bash   
root@fa545d0bd227:$ python3 -c "import cv2; print(cv2.__version__)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'cv2'
root@fa545d0bd227:$ ln -s /usr/local/python/cv2/python-3.7/cv2.cpython-37m-x86_64-linux-gnu.so /usr/local/lib/python3.7/site-packages/cv2.so
root@fa545d0bd227:$ python3 -c "import cv2; print(cv2.__version__)"
4.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant