MacOS 下 Python pip源的修改

1、再Users/XXX/下创建.pip文件夹和pip.conf文件

cd ~
mkdir .pip
cd .pip
touch pip.conf

2、编辑pip.conf文件

sudo vim pip.conf

3、再文件内容里面填入自己想要的源
#阿里云
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com

#清华
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple/
[install]
trusted-host=pypi.tuna.tsinghua.edu.cn

*还有一种安装的方法就是在Pycharm里面安装

猜你喜欢

转载自blog.csdn.net/weixin_43635647/article/details/104250102