You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
# Linux/Mac os 环境中
|
|
|
|
|
配置文件位置在 ~/.pip/pip.conf(如果不存在创建该目录和文件):
|
|
|
|
|
|
|
|
|
|
mkdir ~/.pip
|
|
|
|
|
vi ~/.pip/pip.conf
|
|
|
|
|
|
|
|
|
|
[global]
|
|
|
|
|
index-url = https://pypi.douban.com/simple
|
|
|
|
|
|
|
|
|
|
[install]
|
|
|
|
|
trusted-host = pypi.douban.com
|
|
|
|
|
|
|
|
|
|
====================================================================================
|
|
|
|
|
Windows下,你需要在当前对用户目录下(C:\Users\Administrator\pip)
|
|
|
|
|
创建一个 pip.ini,内容:
|
|
|
|
|
|
|
|
|
|
[global]
|
|
|
|
|
index-url = https://pypi.douban.com/simple
|
|
|
|
|
|
|
|
|
|
[install]
|
|
|
|
|
trusted-host = pypi.douban.com
|
|
|
|
|
|
|
|
|
|
====================================================================================
|
|
|
|
|
# 查看 镜像地址:
|
|
|
|
|
$ pip3 config list
|
|
|
|
|
|
|
|
|
|
global.index-url='https://pypi.douban.com/simple'
|
|
|
|
|
install.trusted-host='pypi.douban.com'
|