Nvidia Jetson TX2开发板学习历程( 2 )- 更换pip源,提升下载速度

经过将pip的源更换为国内源,来提升下载速度,这也将成为从此学习过程下载Python包的基础,建议前期必定要完成!linux

知名的国内源

清华: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/ubuntu

须要注意的是新版的ubuntu要求使用http源。ide

使用方法

临时修改

使用pip install的 -i 命令进行设置,格式以下:学习

-i https://pypi.tuna.tsinghua.edu.cn/simple

例如:阿里云

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyspider

永久修改

经过编辑pip的配置文件进行设置,方法以下:url

在linux中,修改 ~/.pip/pip.config(若是没有就自行建立,格式和前面的必须彻底一致)。code

添加内容以下:pyspider

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

添加其余源,格式与上面的相似依次类推便可。ip

相关文章
相关标签/搜索