解决pip install 速度慢问题

解决pip install 速度慢问题

在Anaconda Prompt中运行pip install速度慢,可以修改为国内源,
注意新版ubuntu要求使用https源。

清华:https://pypi.tuna.tsinghua.edu.cn/simple

阿里云:http://mirrors.aliyun.com/pypi/simple/

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

华中理工大学:http://pypi.hustunique.com/

山东理工大学:http://pypi.sdutlinux.org/

豆瓣:http://pypi.douban.com/simple/

临时使用:
可以在使用pip的时候加参数 -i https://pypi.tuna.tsinghua.edu.cn/simple

例如:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyspider,这样就会从清华这边的镜像去安装pyspider库。

例如:安装tensorflow方法:pip install –upgrade –ignore-installed tensorflow -i https://pypi.tuna.tsinghua.edu.cn/simple

conda install 安装慢
TUNA 还提供了 Anaconda 仓库的镜像,运行以下命令:
conda config –add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config –add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config –set show_channel_urls yes
即可添加 Anaconda Python 免费仓库。
直接粘贴复制以上代码即可。另外,要一行一行运行,并且每一行运行完没有任何结果,直接运行下一行即可。
三行代码运行完,可以运行 conda install numpy 测试一下吧。

或者更改包的下载镜像通道,打开dos命令窗口,然后输入如下命令:
conda config –add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
 

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
xiaoxingxing的头像xiaoxingxing管理团队
上一篇 2023年5月20日
下一篇 2023年5月20日

相关推荐