当前位置:   article > 正文

Command “python setup.py egg_info“ failed with error code 1 in /tmp/pip-build-fuLegg/opencv-python/_failed with error code 1 in /tmp/pip-build-tuftud6

failed with error code 1 in /tmp/pip-build-tuftud6c/opencv-python/
  1. Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-fuLegg/opencv-python/

使用python2.7安装opencv-python时报错,在https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/opencv-python/找到2.7对应版本

其中下载opencv_python-3.1.0.0-cp27-cp27m-manylinux1_x86_64.whl安装时报错:

opencv_python-3.1.0.0-cp27-cp27m-manylinux1_x86_64.whl is not a supported wheel on this platform.

执行命令:

  1. import pip
  2. print(pip.pep425tags.get_supported())

显示支持的版本如下

[('cp27', 'cp27mu', 'manylinux1_x86_64'), ('cp27', 'cp27mu', 'linux_x86_64'), ('cp27', 'none', 'manylinux1_x86_64'), ('cp27', 'none', 'linux_x86_64'), ('py2', 'none', 'manylinux1_x86_64'), ('py2', 'none', 'linux_x86_64'), ('cp27', 'none', 'any'), ('cp2', 'none', 'any'), ('py27', 'none', 'any'), ('py2', 'none', 'any'), ('py26', 'none', 'any'), ('py25', 'none', 'any'), ('py24', 'none', 'any'), ('py23', 'none', 'any'), ('py22', 'none', 'any'), ('py21', 'none', 'any'), ('py20', 'none', 'any')]

根据提示将opencv的whl文件更换为

opencv_python-3.1.0.0-cp27-cp27mu-manylinux1_x86_64.whl

安装成功!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/396803?site
推荐阅读
相关标签
  

闽ICP备14008679号