pip install Flask -i http://pypi.douban.com/simple

~/.pip/pip.conf

The documentation says the config file for Windows is %HOME%\pip\pip.ini, but pip actually looks for %APPDATA%\pip\pip.ini. It only uses %HOME% if %APPDATA% isn't set.

 

On Windows pip should look for its config file in the 'pip' subdirectory of
the user's Home directory (as returned by os.path.expanduser('~')). The
%APPDATA% directory is hidden by default, so it seems it's not intended for
users to modify it directly.

 

The fix is just a matter of removing one line from locations.py. I'm attaching
a diff.

 

%HOME% = C:\Users\<usrname>, e.g. C:\Users\zpc

 

windows:

"C:\Users\zpc\pip\pip.ini"

[global]
timeout = 60
index-url = http://pypi.douban.com/simple
trusted-host = pypi.douban.com

非官方的python第三方软件包安装地址

http://www.lfd.uci.edu/~gohlke/pythonlibs/

相关文章:

  • 2022-12-23
  • 2021-11-18
  • 2022-01-16
  • 2022-02-07
  • 2021-12-04
  • 2022-12-23
  • 2021-08-14
  • 2021-08-30
猜你喜欢
  • 2021-09-17
  • 2021-10-12
  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
  • 2021-08-20
相关资源
相似解决方案