当前位置 博文首页 > 明圣的博客:python各类库安装慢--解决方案
方法1:
可以在使用pip的时候加参数-i https://pypi.tuna.tsinghua.edu.cn/simple
pip install XXX -i https://pypi.tuna.tsinghua.edu.cn/simple
方法2(永久生效):
(1)linux下,修改 ~/.pip/pip.conf (如果没有就创建一个), 修改 index-url至tuna,内容如下:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
(2)windows下,直接在user目录中创建一个pip目录,如:C:\Users\xxx\pip,新建文件pip.ini,内容如下 :
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
方法3
进入下面网站下载需要的包,然后再通过端口命令安装(需要先进入下载文件所在的位置)
https://www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloud