使用NTLM认证的easy_install或pip

5 投票
1 回答
5401 浏览
提问于 2025-04-16 10:27

在我的工作环境中,网络访问是通过NTLM认证来管理的,这和Windows用户账户有关,而easy_install或pip这些工具无法正常使用:

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

在这样的环境下,有办法让它们正常工作吗?

1 个回答

4

使用 NTLMAPS,然后把 pip 指向本地的代理。

撰写回答