Skip to content
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

Failing to install on Python3.8 #400

Closed
elfsonix opened this issue Oct 7, 2020 · 1 comment
Closed

Failing to install on Python3.8 #400

elfsonix opened this issue Oct 7, 2020 · 1 comment

Comments

@elfsonix
Copy link

elfsonix commented Oct 7, 2020

Expected behaviour:

I want to install OpenCv for python3.8 on RaspberryPi.

Actual behaviour:

Installation fails with message:


 Collecting opencv-python
   Using cached opencv-python-4.4.0.44.tar.gz (88.9 MB)
   Installing build dependencies ... error
   ERROR: Command errored out with exit status 1:
    command: /usr/local/bin/python3.8 /usr/local/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-g177ilu2/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel scikit-build cmake pip 'numpy==1.11.3; python_version=='"'"'3.5'"'"'' 'numpy==1.13.3; python_version=='"'"'3.6'"'"'' 'numpy==1.14.5; python_version=='"'"'3.7'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"''
        cwd: None
   Complete output (22 lines):
   Ignoring numpy: markers 'python_version == "3.5"' don't match your environment
   Ignoring numpy: markers 'python_version == "3.6"' don't match your environment
   Ignoring numpy: markers 'python_version == "3.7"' don't match your environment
   Collecting setuptools
     Using cached setuptools-50.3.0-py3-none-any.whl (785 kB)
   Collecting wheel
     Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)
   Collecting scikit-build
     Using cached scikit_build-0.11.1-py2.py3-none-any.whl (72 kB)
   Collecting cmake
     Using cached cmake-3.18.2.post1.tar.gz (28 kB)
       ERROR: Command errored out with exit status 1:
        command: /usr/local/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1wr5nb2g/cmake/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1wr5nb2g/cmake/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-dhutnjw4
            cwd: /tmp/pip-install-1wr5nb2g/cmake/
       Complete output (5 lines):
       Traceback (most recent call last):
         File "<string>", line 1, in <module>
         File "/tmp/pip-install-1wr5nb2g/cmake/setup.py", line 7, in <module>
           from skbuild import setup
       ModuleNotFoundError: No module named 'skbuild'
       ----------------------------------------
   ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
   ----------------------------------------
 ERROR: Command errored out with exit status 1: /usr/local/bin/python3.8 /usr/local/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-g177ilu2/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel scikit-build cmake pip 'numpy==1.11.3; python_version=='"'"'3.5'"'"'' 'numpy==1.13.3; python_version=='"'"'3.6'"'"'' 'numpy==1.14.5; python_version=='"'"'3.7'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"'' Check the logs for full command output.

Steps to reproduce:

operating system: RaspberryPi OS (32-bit) (https://www.raspberrypi.org/downloads/raspberry-pi-os/)
I am using the newest pip version (20.2.3) and command "python3.8 -m pip install opencv-python" (I also have python 3.7 installed, it works fine with 3.7 but I need to work with 3.8)

How can I fix this?

@skvark
Copy link
Member

skvark commented Oct 7, 2020

This project does not support ARM platforms due to various issues. You're seeing one of them, and it's caused by the cmake dependency:

File "/tmp/pip-install-1wr5nb2g/cmake/setup.py", line 7, in <module>
-------------------------------------^^^^

cmake has issues with ARM systems. See this issue for more info: scikit-build/cmake-python-distributions#103

Python 3.7 works because PiWheels provides a pre-built packages for that version (Python 3.8 is not supported): https://www.piwheels.org/project/opencv-python/

arm64 support tracking issue for opencv-python (also blocked by cmake issues): #366

Your options are:

@skvark skvark closed this as completed Oct 7, 2020
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

2 participants