如何在验证代理后面的Windows上使用pip(How to use pip on windows behind an authenticating proxy)

编程入门 行业动态 更新时间:2024-10-25 02:28:11
如何在验证代理后面的Windows上使用pip(How to use pip on windows behind an authenticating proxy)

我的电脑在Windows服务器(使用活动目录)后面的代理运行Windows,我无法弄清楚如何通过pip (在python3中)。 我已经尝试使用--proxy ,但它仍然只是超时。 我也尝试设置一个很长的超时(60s),但没有什么区别。 我的代理设置是正确的,我将其与我在TortoiseHG中成功使用的那些进行了比较,以确保。

有没有其他的技巧,任何人都知道我可以尝试,还是有一些限制在Windows代理?

更新:我失败的尝试涉及搜索pypi。 我刚刚尝试安装的东西,它的工作。 搜索仍然失败。 这是否表示一个漏洞,或者他们的工作方式不同?

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?

最满意答案

我已经尝试了两个选项,这两个选项都适用于我公司的NTLM身份验证代理。 选项1是使用--proxy http://user:pass@proxyAddress:proxyPort

如果你仍然有麻烦,我建议安装一个代理身份验证服务(我使用CNTLM ),并指向点,即--proxy http://localhost:3128

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

更多推荐

本文发布于:2023-07-06 07:55:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1047567.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何在   Windows   pip   proxy   authenticating

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!