pip设置清华镜像

换源有两种方法:

一、临时换源
比如这里,下载某个包的时候临时将镜像源换成清华源

pip install package_name -i https://pypi.tuna.tsinghua.edu.cn/simple 

package_name 为要 pip安装的包

二、永久换源
通过修改配置文件来永久使用某个镜像源: 

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple


三、重置镜像源
通过下面命令查看当前设置的镜像源:

pip config list


 

       

你可能感兴趣的:(pip,python,开发语言)