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.
执行命令:
import pip
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
安装成功!
本文详细记录了在Python2.7环境下安装OpenCV-Python遇到的错误及解决过程,包括选择正确的whl文件版本,确保与系统环境兼容。
1万+

被折叠的 条评论
为什么被折叠?



