Python pip源配置


pip源配置文件可以放置的位置:

Linux/Unix:

  • /etc/pip.con
  • ~/.pip/pip.conf
  • ~/.config/pip/pip.conf

Mac OSX:

  • ~/Library/Application Support/pip/pip.conf
  • ~/.pip/pip.conf
  • /Library/Application Support/pip/pip.conf

Windows:

  • %APPDATA%\pip\pip.ini
  • %HOME%\pip\pip.ini
  • C:\Documents and Settings\All Users\Application Data\PyPA\pip\pip.conf (Windows XP)
  • C:\ProgramData\PyPA\pip\pip.conf (Windows 7及以后)

pip配置的主要一些配置: 可以配置如下:

[global]  
index-url = http://pypi.douban.com/simple 
trusted-host = pypi.douban.com
disable-pip-version-check = true
timeout = 120
[list]
format=columns

 评论