一、Python2.7安装opencv-python
提示错误:
ERROR: Command errored out with exit status 1: /usr/bin/python /home/ljl/.local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpOJny2O Check the logs for full command output.
1、如果直接使用,一下命令就会提示上述错误:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python
是因为用此方法会自动下载 opencv-python的最新 版本,但是python2却不支持。
2、解决办法:指定python2支持的 opencv-python的版本,
如下:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python==4.2.0.32
二、Python2.7安装tensorflow
python2.7支持tensorflow的1.4.1版本
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow==1.4.1