python安装
下载
https://www.python.org/downloads/windows/
切换源
永久更改镜像源
在命令提示符中运行以下命令,将pip的下载源永久更改为清华大学开源镜像站:
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/
临时使用镜像源
如果只是在安装某个库时临时使用某个镜像,可以在安装命令中添加-i参数。例如,从清华大学镜像站下载pandas库:
pip install pandas -i https://pypi.tuna.tsinghua.edu.cn/simple/
常用国内镜像源
-
豆瓣:
pip config set global.index-url http://pypi.douban.com/simple/
-
阿里云:
pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/
-
华为云:
pip config set global.index-url https://repo.huaweicloud.com/repository/pypi/simple
-
清华大学:
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
-
中科大:
pip config set global.index-url https://pypi.mirrors.ustc.edu.cn/simple/

浙公网安备 33010602011771号