Forums

ModuleNotFoundError: No module named 'cv2' on Python 3

According to this post (https://www.pythonanywhere.com/forums/topic/1069/), OpenCV is already installed, but whenever I import cv2, I get a ModuleNotFoundError: No module named 'cv2' error. I'm using Python 3 on a Flask app. I can't install it with pip because I don't have enough storage space.

Our current system image only has it installed for Python 2; our next one (which should be released in a week or two) will support it for Python 3. We'll post back here when that is live.

@MmBaguette -- it's done! :-) We've released new system image glastonbury which has cv2 available for Python 3. To upgrade your system image, see: https://help.pythonanywhere.com/pages/ChangingSystemImage/.

@pafk @giles Thank you for your hard work and dedication! Image processing plays a significant role in all my projects.

Glad we could help! And do let us know if you have any problems with the new installs once you've switched to glastonbury.