当前位置:   article > 正文

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

could not find a version that satisfies the requirement pip3 (from versions:

mark:https://blog.csdn.net/whatday/article/details/116356053

现象:


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

原因: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
  
  
  • 1

执行输出如下:


  
  
  1. [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
  2. Looking in indexes: https://pypi.mirrors.ustc.edu.cn/simple/
  3. Collecting pycryptodome
  4. 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)
  5. |████████████████████████████████| 1.9 MB 1.4 MB/s
  6. Installing collected packages: pycryptodome
  7. Successfully installed pycryptodome-3.10.1
  8. WARNING: You are using pip version 20.2.3; however, version 21.1.1 is available.
  9. You should consider upgrading via the '/opt/python3/bin/python3.9 -m pip install --upgrade pip' command.
  10. [root@e45b79f0cd70 Python-3.9.0] #
  • 1

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

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/运维做开发/article/detail/745137
推荐阅读
相关标签
  

闽ICP备14008679号