换源

简介: 换源

Warning

不知道为什么,这么多次尝试下来,不管是 Windows 还是 Linux ,我使用清华源都是有问题的,建议使用阿里源


可用软件源列表


临时使用

$ pip install scrapy -i http://mirrors.aliyun.com/pypi/simple/ 点击复制复制失败已复制


永久修改-命令版

$ pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/ 
$ pip config set global.trusted-host mirrors.aliyun.com点击复制复制失败已复制


永久修改-配置文件


Linux

修改 ~/.pip/pip.conf (没有就创建一个), 内容如下:

[global]
timeout = 6000
index-url = http://mirrors.aliyun.com/pypi/simple/ 
trusted-host = mirrors.aliyun.com点击复制复制失败已复制


Windows

win+R 打开用户目录 %HOMEPATH% ,在此目录下创建 pip 文件夹,在 pip 目录下创建 pip.ini 文件, 内容如下:

[global]
timeout = 6000
index-url = http://mirrors.aliyun.com/pypi/simple/ 
trusted-host = mirrors.aliyun.com
目录
相关文章
|
11月前
|
Ubuntu
Ubuntu安装aptitude
Ubuntu安装aptitude
115 0
debian11换源
直接编辑 /etc/apt/sources.list 文件
1033 0
|
2月前
pip换源
pip换源
91 0
|
3月前
|
Ubuntu Linux iOS开发
|
5月前
|
Ubuntu Shell Linux
ubuntu安装conda
ubuntu安装conda
144 0
|
5月前
|
开发工具 数据安全/隐私保护 git
git安装
git安装
|
Ubuntu 开发工具 git
Ubuntu安装GitKraken
Ubuntu安装GitKraken
580 0
|
Ubuntu
换源
换源
659 0
换源(命令版)——推荐
换源(命令版)——推荐
117 0