python pypi配置国内镜像

网上配置方法很多:

清华镜像地址:

https://mirrors.tuna.tsinghua.edu.cn/help/pypi/

先说明下,楼主在win10上搭建python环境,先通过手动在C/Users/Administrator/目录下新建了pip/pip.ini文件,在里面添加了

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

代码后,运行pip install 命令,提示“gbk”编码错误,猜测是文件格式不正确,后通过cmd命令直接创建文件,添加以上配置以后运行成功。

copy nul %USERPROFILE%\pip\pip.ini

猜你喜欢

转载自betakoli.iteye.com/blog/2389133