Toybrick

pip3安装opencv报错

luxiaofei

高级会员

积分
654
楼主
发表于 2020-8-15 10:16:44    查看: 9486|回复: 2 | [复制链接]    打印 | 只看该作者
toybrick板子,debian10系统,安装opencv报错
  1. toybrick@debian10:~/Downloads$ pip3 install opencv-python                     
  2. Defaulting to user installation because normal site-packages is not writeable
  3. Looking in indexes: https://pypi.org/simple, http://repo.rock-chips.com/pypi/simple
  4. Collecting opencv-python
  5.   Using cached opencv-python-4.4.0.40.tar.gz (88.9 MB)
  6.   Installing build dependencies ... error
  7.   ERROR: Command errored out with exit status 1:
  8.    command: /usr/bin/python3 /usr/local/lib/python3.7/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-8w0xbnu4/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url http://repo.rock-chips.com/pypi/simple --trusted-host repo.rock-chips.com -- 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'"'"''
  9.        cwd: None
  10.   Complete output (23 lines):
  11.   Looking in indexes: https://pypi.org/simple, http://repo.rock-chips.com/pypi/simple, http://repo.rock-chips.com/pypi/simple
  12.   Ignoring numpy: markers 'python_version == "3.5"' don't match your environment
  13.   Ignoring numpy: markers 'python_version == "3.6"' don't match your environment
  14.   Ignoring numpy: markers 'python_version >= "3.8"' don't match your environment
  15.   Collecting setuptools
  16.     Using cached setuptools-49.6.0-py3-none-any.whl (803 kB)
  17.   Collecting wheel
  18.     Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)
  19.   Collecting scikit-build
  20.     Using cached scikit_build-0.11.1-py2.py3-none-any.whl (72 kB)
  21.   Collecting cmake
  22.     Using cached cmake-3.18.0.tar.gz (28 kB)
  23.       ERROR: Command errored out with exit status 1:
  24.        command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-drqorqvn/cmake/setup.py'"'"'; __file__='"'"'/tmp/pip-install-drqorqvn/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-eklppbqv
  25.            cwd: /tmp/pip-install-drqorqvn/cmake/
  26.       Complete output (5 lines):
  27.       Traceback (most recent call last):
  28.         File "<string>", line 1, in <module>
  29.         File "/tmp/pip-install-drqorqvn/cmake/setup.py", line 7, in <module>
  30.           from skbuild import setup
  31.       ModuleNotFoundError: No module named 'skbuild'
  32.       ----------------------------------------
  33.   ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  34.   ----------------------------------------
  35. ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/local/lib/python3.7/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-8w0xbnu4/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url http://repo.rock-chips.com/pypi/simple --trusted-host repo.rock-chips.com -- 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.
复制代码



回复

使用道具 举报

jefferyzhang

版主

积分
12925
沙发
发表于 2020-8-16 16:40:01 | 只看该作者
pip安装时候是不会自动解决系统依赖问题的,缺什么就自己apt装什么。
或者用更简单的方法,直接用apt install python3-opencv (好像是这个名字)来安装,才会自己解决系统依赖
回复

使用道具 举报

Ptolemaeus

中级会员

积分
205
板凳
发表于 2021-3-12 07:54:03 | 只看该作者
编译的时候需要服务器和目标机都是Ubuntu吗?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

产品中心 购买渠道 开源社区 Wiki教程 资料下载 关于Toybrick


快速回复 返回顶部 返回列表