python pip安装 更换国内镜像源

1、临时修改镜像源

在安装库的时候,临时需要用到某个镜像,这里以清华大学镜像为例下载pandas库

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

2、永久修改镜像源

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

 

posted @ 2023-07-28 15:40  唏嘘-  阅读(133)  评论(0编辑  收藏  举报