Mac OS下修改Python的镜像源linux
步骤:vim
切换到家目录bash
建立目录 .pip 并切换到该目录测试
建立 pip.conf 文件并写入配置信息阿里云
[global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple [install] trusted-host=pypi.tuna.tsinghua.edu.cn
以上采用的是 清华大学 的镜像源,通过测试比较稳定url
也能够用其余:spa
清华:https://pypi.tuna.tsinghua.edu.cn/simplecode
阿里云:http://mirrors.aliyun.com/pypi/simple/blog
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ip
华中理工大学:http://pypi.hustunique.com/
山东理工大学:http://pypi.sdutlinux.org/
豆瓣:http://pypi.douban.com/simple/
cd ~ mkdir .pip cd .pip touch pip.confvim pip.conf # 使用vim写入配置信息