阿里云镜像地址:
https://mirrors.aliyun.com/pypi/simple/
中国科技大学镜像地址
https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/
豆瓣镜像地址
https://pypi.doubanio.com/simple/
清华大学镜像地址
https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学镜像地址
https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/
网址打开都是就是一个个的扩展包链接
pycharm修改方法:
一般删除原镜像比较稳妥:选中原镜像地址(点击右侧的减号),再添加上面的地址
然后一路OK就行了
linux和windows临时使用:
可以在使用pip的时候在后面加上-i参数,指定pip源
eg: pip install scrapy -i https://pypi.tuna.tsinghua.edu.cn/simple
永久修改:
linux:
修改 ~/.pip/pip.conf (没有就创建一个), 内容如下:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
Windows:
直接在user目录中创建一个pip目录,如:C:\Users\jjjjj\pip
然后新建文件pip.ini,内容如下:
[global]
timeout = 6000
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = https://pypi.tuna.tsinghua.edu.cn