Forums

Installing new module: cv2

I am trying to import cv2 on my flask_app.py page but I get the following back when I try to intstall through my bashconsole:

mkvirtualenv my-virtualenv --python=python3.6

pip install cv2

ERROR: Could not find a version that satisfies the requirement cv2 (from ver sions: none) ERROR: No matching distribution found for cv2

When I tried to research up on how to fix this issue, I was advised to use pip install opencv-python I am not sure if the two are the same but, when I tried that I get the error

ERROR: Could not install packages due to an EnvironmentError: [Errno 122] Disk quota exceeded

Then, when I tried to do it a second time, hoping that it would work that time I got the following after using pip install opencv-python:

Looking in links: /usr/share/pip-wheels Collecting opencv-python Downloading https://files.pythonhosted.org/packages/73/81/ee64edfa0331eb975e48d38ad4ea60e92c653aac28db6a5561ebae57f2e2/opencv_python-4.1.2.30-cp27-cp27mu-manylinux1_x86_64.whl (28.3MB) 100% |████████████████████████████████| 28.3MB 78kB/s Requirement already satisfied: numpy>=1.11.1 in /usr/local/lib/python2.7/dist-packages (from opencv-python) (1.14.5) Installing collected packages: opencv-python Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/cv2/init.py' Consider using the --user option or check the permissions.

It's because for a free account, you do not have enough disk space to install cv2.

Is there anything I could delete in order to make space for cv2? I was going to present my project tomorrow and that is the last issue I believe I am having. Also, could you confirm which line of code is the one that should work if I am able to resolve this storage issue!

You should install with --user. There isn't really anything you can delete- eg: cv2 may be over the 500mb free user limit itself.