由于现在python的2.x版本不再维护,实际很多依赖都是3.x的,这里简单介绍一下cento环境如何安装pip3命令.

安装:

  yum install -y python3-pip

配置镜像加速:

  nano /root/.pip/pip.conf 

这里root是你要安装的登录用户主目录

pip.conf文件内容

[global]
#index-url=http://mirrors.aliyun.com/pypi/simple/
index-url= https://pypi.tuna.tsinghua.edu.cn/simple


[install]
#trusted-host=mirrors.aliyun.com
trusted-host=pypi.tuna.tsinghua.edu.cn

查看是否安装成功:

  [root@izm5e0cjxe9c7jek2izwafz ~]# pip3 -V
  pip 9.0.3 from /usr/lib/python3.6/site-packages (python 3.6)

相关文章:

  • 2021-06-17
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-19
  • 2021-12-03
  • 2022-12-23
  • 2022-02-22
  • 2021-06-30
相关资源
相似解决方案