设置pip3配置国内源

[root@localhost ~]# mkdir ~/.pip
[root@localhost ~]# echo '[global]' >> ~/.pip/pip.conf
[root@localhost ~]# c1="index-url=https://"
[root@localhost ~]#  c2="mirrors.aliyun.com/pypi/simple"
[root@localhost ~]# echo "${c1}${c2}" >> ~/.pip/pip.conf

设置pip3配置国内源_第1张图片

> 豆瓣源:    `https://pypi.douban.com/simple/`
> 阿里源:   `https://mirrors.aliyun.com/pypi/simple`

验证

        安装一个增强版的解释器ipython用于测试

[root@localhost ~]# pip3 install ipython

设置pip3配置国内源_第2张图片安装完成

设置pip3配置国内源_第3张图片安装新的pip

你可能感兴趣的:(Python,linux,运维,服务器)