EbenKouao / pi-camera-stream-flask

Create your own live camera stream using a Raspberry Pi 4
MIT License
324 stars 127 forks source link

problems with sudo pip3 install opencv-contrib-python #5

Open carlosarancon opened 3 years ago

carlosarancon commented 3 years ago

Hello,

Im following this project for an university project and as I said in the title, im having troubles with that instruction. It is stucked in "running setup.py bdist.wheel for opencv-contrib-python..." for more than an hour. I hope anyone can help me.

Thank you for your time!

Zodeh commented 3 years ago

I ran into the same issue when I ran "sudo pip3 install opencv-contrib-python". I ended up skipping that install and it looks like it ended up not being needed.

scriven42 commented 3 years ago

In my experience, an hour isn't necessarily long enough to wait for that command to finish depending on your hardware.

The OpenCV libraries are massive. I've even had to temporarily increase my swap space to 2GB to make that command work, and on a zero it took a very long time, IIRC almost a day.

carlosarancon commented 3 years ago

I handle to install it, but I don't remember how, try it running without "sudo" or if not, with "pip" instead with "pip3"

janetckm commented 3 years ago

I handle to install it, but I don't remember how, try it running without "sudo" or if not, with "pip" instead with "pip3"

without "sudo" works for me pip3 install opencv-contrib-python

fjolublar commented 3 years ago

a better way to install libraries is to use: python3 -m pip install

louisemorris-123 commented 3 years ago

Hi everyone,

I'm new to Raspberry Pi and I'm following these instructions for a university project. I am also unable to install Python using the code pip3 install opencv-contrib-python (as included in the instructions).

However, I get the following error message in red Command "/usr/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-j01sh4o2 --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple -- setuptools wheel scikit-build cmake pip "numpy==1.13.3; python_version=='3.6' and platform_machine != 'aarch64' and platform_machine != 'arm64'" "numpy==1.19.3; python_version>='3.6' and sys_platform == 'linux' and platform_machine == 'aarch64'" "numpy==1.21.0; python_version>='3.6' and sys_platform == 'darwin' and platform_machine == 'arm64'" "numpy==1.14.5; python_version=='3.7' and platform_machine != 'aarch64' and platform_machine != 'arm64'" "numpy==1.17.3; python_version=='3.8' and platform_machine != 'aarch64' and platform_machine != 'arm64'" "numpy==1.19.3; python_version>='3.9' and platform_machine != 'aarch64' and platform_machine != 'arm64'"" failed with error code 1 in None

I've tried all your suggestions above but it still won't install. This error seems to be stopping all the other instructions afterwards from working because the main.py document afterwards wont run and also results in an error.

Any help would be most welcome! Many thanks, Louise

kpt93 commented 3 years ago

Hi, you could possibly try the raspbian version of OpenCV. I believe the latest version of OpenCV are not compatible with RPI

sudo apt-get opencv-contrib-python