如何在Windows上使用PIP后面身份验证代理 [英] How to use pip on windows behind an authenticating proxy

查看:557
本文介绍了如何在Windows上使用PIP后面身份验证代理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的电脑运行的是Windows后面的Windows服务器上的代理(使用Active Directory),我不能找出如何通过它与获得PIP (以python3)。我一直在使用尝试 - 代理,但它仍然只是超时。我自己也尝试设置一个长超时(60秒),但是这并没有区别。我的代理服务器设置是否正确,我与那些我用成功TortoiseHG,以确保他们相比。

是否有任何人知道的,我可以试试,或者是有在一定的局限性PIP 的问候窗口代理其他任何花样?

更新:我的失败尝试搜索涉案PyPI中。我只是真的试图安装的东西,它的工作。搜索虽然还是失败。这是否表明 PIP 中的错误或他们的工作方式不同?


解决方案

我曾尝试对我公司的NTLM身份验证代理2选项,这些选项都工作


选项​​1是使用 - 代理的http://用户名:@传proxyAddress:proxyPort

如果您仍然有问题,我建议安装一个代理身份验证服务(我用 CNTLM ),并在它的东西,即指向点子像 - 代理的http://本地主机:3128

My computer is running windows behind a proxy on a windows server (using active directory), and I can't figure out how to get through it with pip (in python3). I have tried using --proxy, but it still just timeouts. I have also tried setting a long timeout (60s), but that made no difference. My proxy settings are correct, and I compared them with those that I'm using successfully in TortoiseHG to make sure.

Are there any other tricks that anyone knows of that I can try, or is there some limitation in pip with regards to windows proxies?

Update: My failed attempts involved searching pypi. I've just tried actually installing something and it worked. Searching still fails though. Does this indicate a bug in pip or do they work differently?

解决方案

I have tried 2 options which both work on my company's NTLM authenticated proxy. Option 1 is to use --proxy http://user:pass@proxyAddress:proxyPort

If you are still having trouble I would suggest installing a proxy authentication service (I use CNTLM) and pointing pip at it ie something like --proxy http://localhost:3128

这篇关于如何在Windows上使用PIP后面身份验证代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆