ubuntu18.04修改pip源为阿里源【详细教程】

今天爱分享给大家带来ubuntu18.04修改pip源为阿里源【详细教程】,希望能够帮助到大家。

cd ~
mkdir .pip
cd ~/.pip
touch pip.conf
vim pip.conf

然后写入:

[global]
trusted-host=mirrors.aliyun.com
index-url=https://mirrors.aliyun.com/pypi/simple/

按照下面的命令推出:

:wq

然后用pip安装的时候就换成了阿里的源了:

eric@eric-HP-Z420-Workstation:~$ pip3 install tensorflow-gpu==1.14
Collecting tensorflow-gpu==1.14
/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/connectionpool.py:860: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
/usr/share/python-wheels/urllib3-1.22-py2.py3-none-any.whl/urllib3/connectionpool.py:860: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  Downloading https://mirrors.aliyun.com/pypi/packages/76/04/43153bfdfcf6c9a4c38ecdb971ca9a75b9a791bb69a764d652c359aca504/tensorflow_gpu-1.14.0-cp36-cp36m-manylinux1_x86_64.whl (377.0MB)
    26% |████████▌                       | 99.6MB 13.5MB/s eta 0:00:21

人已赞赏
Linux

mac sox如何安装【详细教程】

2020-11-14 23:00:28

Linux

挂载juicefs TypeError: a bytes-like object is required, not 'str'【解决办法】

2020-11-15 10:49:09

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
'); })();