【python】python切换pip镜像源
临时使用,从阿里云镜像下载库:
pip install pandas -i https://mirrors.aliyun.com/pypi/simple
永久使用,永久修改本地npm的配置:
pip config set global.index-url http://192.168.1.106:3375/repository/swis_pypi_python/simple
如果是内网ip,还需要加上信任。
如:Windows(具体路径看执行命令后,返回,但都是在用户目录下)
C:\Users\Administrator\AppData\Roaming\pip\pip.ini
# 增加信任ip,如:
[global]
index-url = http://192.168.1.106:3375/repository/swis_pypi_python/simple
trusted-host = 10.168.1.106
其他源镜像
阿里云
https://mirrors.aliyun.com/pypi/simple
清华大学
https://pypi.tuna.tsinghua.edu.cn/simple
中国科技大学
https://pypi.mirrors.ustc.edu.cn/simple
清华大学开源软件镜像站: https://mirrors.tuna.tsinghua.edu.cn/
阿里云开源镜像站: https://mirrors.aliyun.com/
中国科学技术大学镜像站: https://mirrors.ustc.edu.cn/
华中科技大学镜像站: https://mirrors.hust.edu.cn/