记载一次解决python的pip依赖的过程

比如我要安装一个lxml ,-i 是指定 pip源

# pip3 install lxml -i  https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting lxml
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/8d/63/03f25363b26fa27a733d920554d73e34390830b3b5c012d7a9f721d1dc2d/lxml-4.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (6.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.4/6.4 MB 11.5 MB/s eta 0:00:00
Installing collected packages: lxml
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
cvemap 1.0.1 requires openpyxl>=3.0.7, which is not installed.
cvemap 1.0.1 requires paramiko>=2.7.2, but you have paramiko 2.6.0 which is incompatible.
Successfully installed lxml-4.8.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

提示 openpyxl 没有安装,并且 paramiko 需要升级高于2.7.2的版本

于是安装 openpyxl

pip3 install openpyxl -i  https://pypi.tuna.tsinghua.edu.cn/simple

升级 paramiko 

pip3 install --upgrade paramiko==2.7.2 -i  https://pypi.tuna.tsinghua.edu.cn/simple

再次安装 lxml,成功

pip3 install lxml -i  https://pypi.tuna.tsinghua.edu.cn/simple

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值