最近安装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
最近安装pytorch,速度只有7~8k/s,甚至装着装着会直接失败。
看了网上的很多方法,发现直接更改pip源即可。
~$ mkdir ~/.pip
~$ sudo gedit ~/.pip/pip.conf
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com