配置当前用户使用豆瓣pip源
Posted Yudar
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了配置当前用户使用豆瓣pip源相关的知识,希望对你有一定的参考价值。
配置当前用户使用豆瓣pip源
- mkdir ~/.pip/
- cat ~/.pip/pip.conf
- [global]
- index-url = http://pypi.douban.com/simple
- download_cache = ~/.cache/pip
- [install]
- use-mirrors = true
- mirrors = http://pypi.douban.com/
- 一些可选的参数
- trusted-host = pypi.douban.com
- timeout=6000
- On Unix the default configuration file is:
$HOME/.config/pip/pip.conf
which respects theXDG_CONFIG_HOME
environment variable.- On Mac OS X the configuration file is
$HOME/Library/Application Support/pip/pip.conf
.- On Windows the configuration file is
%APPDATA%\pip\pip.ini
.There are also a legacy per-user configuration file which is also respected, these are located at:
- On Unix and Mac OS X the configuration file is:
$HOME/.pip/pip.conf
- On Windows the configuration file is:
%HOME%\pip\pip.ini
You can set a custom path location for this config file using the environment variable
PIP_CONFIG_FILE
.Inside a virtualenv:
- On Unix and Mac OS X the file is
$VIRTUAL_ENV/pip.conf
- On Windows the file is:
%VIRTUAL_ENV%\pip.ini
以上是关于配置当前用户使用豆瓣pip源的主要内容,如果未能解决你的问题,请参考以下文章