Python2.7安装opencv-python,tensorflow

一、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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值