国内镜像站
|
|
Windows配置方法
用notepad++创建pip.ini文件,保存位置为%USERPROFILE%\pip\pip.ini.
%USERPROFILE%具体指的是什么目录,可以cmd命令行中输入set,查看所有系统变量,找到USERPROFILE,
我的为C:\Users\adair-0101.
pip.ini文件内容如下:123[global]timeout = 300index-url = http://pypi.douban.com/simple
Ubuntu下配置
进去Ubuntu终端做如下配置12345678910$ mkdir ~/.pip/$ touch ~/.pip/pip.conf$ vim ~/.pip/pip.conf[global]index-url = http://pypi.douban.com/simpledownload_cache = ~/.cache/pip[install]use-mirrors = truemirrors = http://pypi.douban.com/trusted-host = pypi.douban.com