ubuntu解决pip下载过慢的问题

最近安装pytorch,速度只有7~8k/s,甚至装着装着会直接失败。

看了网上的很多方法,发现直接更改pip源即可。

1.打开终端:

~$ mkdir ~/.pip
~$ sudo gedit ~/.pip/pip.conf

2.添加国内源

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com

3.完成

发布了22 篇原创文章 · 获赞 0 · 访问量 586

猜你喜欢

转载自blog.csdn.net/SampsonTse/article/details/103997667