5

In my working environment, internet access is managed by NTLM authentication and is associated with Windows user account, and easy_install or pip doesn't work:

C:\>easy_install django
install_dir D:\Python26\Lib\site-packages\
Searching for django
Reading http://pypi.python.org/simple/django/
Download error: timed out -- Some packages may not be found!
....

C:\>pip install django
Downloading/unpacking django
  Cannot fetch index base URL http://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement django
No distributions at all found for django

Is it possible to get them working in such an environment?

Wang Dingwei
  • 4,661
  • 6
  • 32
  • 43
  • Duplicate http://stackoverflow.com/questions/9698557/how-to-use-pip-on-windows-behind-an-authenticating-proxy/ – rofrol Jul 06 '15 at 14:23

1 Answers1

4

Use NTLMAPS, and point pip to the local proxy.

sykora
  • 96,888
  • 11
  • 64
  • 71
  • 2
    The system requirements says it needs Python 1.5.2 and higher, which makes me think it's a very ancient package, but it does work with python 2.6! And cntlm(http://cntlm.sourceforge.net/) mentioned there also works. Thanks! – Wang Dingwei Jan 23 '11 at 09:40
  • 1
    Oh, sorry. I use cntlm myself on Linux, and I thought it was Linux-only for some reason. If cntlm works on windows for you, that's the way to go. – sykora Jan 23 '11 at 13:54
  • I couldn't get NTLMAPS working but I was able to use cntlm. Thanks! – John Jiang Apr 17 '12 at 01:07
  • I was able to get cntlm to work with easy_install once I set `HTTPS_PROXY` and `HTTP_PROXY` environment variables. – Jeff B Jun 25 '15 at 19:55