python3 pip3 安装包报错 Could not find a version that satisfies the requirement 解决方法

现象:

[root@e45b79f0cd70 Python-3.9.0]# pip3 install pycryptodome
Looking in indexes: https://pypi.douban.com/simple/
ERROR: Could not find a version that satisfies the requirement pycryptodome (from versions: none)
ERROR: No matching distribution found for pycryptodome
[root@e45b79f0cd70 Python-3.9.0]#

原因:pip3 镜像源问题 更换镜像源 ,当前使用的镜像源 https://pypi.douban.com/simple/ 更换为 https://pypi.mirrors.ustc.edu.cn/simple/

解决方法:

mkdir -p /$HOME/.pip/ && echo -e "[global]\nindex-url = https://pypi.mirrors.ustc.edu.cn/simple/\n" > /$HOME/.pip/pip.conf && pip3 install pycryptodome

执行输出如下:

[root@e45b79f0cd70 Python-3.9.0]# mkdir -p /$HOME/.pip/ && echo -e "[global]\nindex-url = https://pypi.mirrors.ustc.edu.cn/simple/\n" > /$HOME/.pip/pip.conf && pip3 install pycryptodome
Looking in indexes: https://pypi.mirrors.ustc.edu.cn/simple/
Collecting pycryptodome
  Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/ad/16/9627ab0493894a11c68e46000dbcc82f578c8ff06bc2980dcd016aea9bd3/pycryptodome-3.10.1-cp35-abi3-manylinux2010_x86_64.whl (1.9 MB)
     |████████████████████████████████| 1.9 MB 1.4 MB/s
Installing collected packages: pycryptodome
Successfully installed pycryptodome-3.10.1
WARNING: You are using pip version 20.2.3; however, version 21.1.1 is available.
You should consider upgrading via the '/opt/python3/bin/python3.9 -m pip install --upgrade pip' command.
[root@e45b79f0cd70 Python-3.9.0]#

pip3 镜像源参考 :《python3 pip 更换国内 pypi 镜像 源》https://blog.csdn.net/whatday/article/details/105431658

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值