相关疑难解决方法(0)

在代理后面使用pip

我正在尝试在工作中使用代理背后的pip.

这篇文章的答案之一建议使用CNTLM.我按照其他帖子安装并配置了它,但是运行时cntlm.exe -c cntlm.ini -I -M http://google.com出错了Connection to proxy failed, bailing out.

我也试过pip install -–proxy=user:pass@localhost:3128(默认的CNTLM端口)但是提出了Cannot fetch index base URL http://pypi.python.org/simple/.很明显,代理商可以做些什么.

有没有人知道如何更确切地检查CNTLM是否设置正确,或者是否还有另一种解决方法?我知道你也可以http_proxy这里描述的那样设置环境变量,但是我不确定要放入什么凭证.来自哪些凭证cntlm.ini

python proxy pip

271
推荐指数
17
解决办法
67万
查看次数

如何在Python 2.7中设置HTTP代理?

我正在尝试运行安装pip:get-pip.py的脚本,并且由于我的网络在HTTP代理后面而导致连接超时.有没有什么方法可以在我的Python 2.7安装中配置HTTP代理,以便能够安装我想要安装的内容?

注意:我使用的是Windows.以下是我得到的错误:

C:\SetupFiles>python get-pip.py
Downloading/unpacking pip
  Cannot fetch index base URL http://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement pip
No distributions at all found for pip
Run Code Online (Sandbox Code Playgroud)

python

69
推荐指数
3
解决办法
25万
查看次数

在 nexus 上创建并使用 PyPi 代理存储库

运行 Nexus 3 OSS 3.6.0-02 我使用本指南在 nexus 上创建了一个 pypi 代理存储库:

https://help.sonatype.com/repomanager3/pypi-repositories

具有以下信息:

Format: pypi
Type: proxy
URL: https://mynexus:9666/nexus/pypi-proxy/
Remote Storage:https://pypi.org/
Authentication: Username/Password
Run Code Online (Sandbox Code Playgroud)

现在我想安装一个包并使用上面的代理。基于:

如何让 pip 在代理服务器后面工作

这个例子:

pip install --proxy http://user:password@proxyserver:port <package>   
Run Code Online (Sandbox Code Playgroud)

我努力了:

pip install --proxy https://myuser:mypassword@mynexus:9666/nexus/pypi-proxy/ testinfra --no-cache-dir
Run Code Online (Sandbox Code Playgroud)

但我得到:

Collecting testinfra
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Invalid response from tunnel request',))': /simple/testinfra/
Run Code Online (Sandbox Code Playgroud)

我的命令行中有错误吗?或者我需要在服务器/存储库上配置什么?

python pip

11
推荐指数
2
解决办法
2万
查看次数

pip安装失败,需要407 Proxy Authentication

我正在尝试使用下面的pip install命令,但它失败了代理身份验证需要问题.我已经在RHEL7.x服务器中配置了代理.

Command Used: `pip install --proxy https://'username:pwd'@proxy:host  --upgrade pip`
Run Code Online (Sandbox Code Playgroud)

日志:

Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/pip/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/pip/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/pip/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after …
Run Code Online (Sandbox Code Playgroud)

authentication proxy pip rhel tunnel

9
推荐指数
2
解决办法
3万
查看次数

PIP如何在密码中转义字符#?

想继续问题 如何让pip在代理服务器后面工作

我有Windows Server和Python 3.5(64).

在密码中,我的用户包括#.

我尝试使用一些解决方法:

"C:\Program Files\Python35\scripts\pip.exe" install --proxy http://proxy_user:pwd#123@proxy.su:1111 TwitterApi

"C:\Program Files\Python35\scripts\pip.exe" install --proxy "http://proxy_user:pwd#123"@proxy.su:1111 TwitterApi

"C:\Program Files\Python35\scripts\pip.exe" install --proxy http://"proxy_user:pwd#123"@proxy.su:1111 TwitterApi

"C:\Program Files\Python35\scripts\pip.exe" install --proxy http://proxy_user:"pwd#123"@proxy.su:1111 TwitterApi

但是得到错误

  File "c:\program files\python35\lib\site-packages\pip\_vendor\requests\package
s\urllib3\util\url.py", line 189, in parse_url
    raise LocationParseError(url)
pip._vendor.requests.packages.urllib3.exceptions.LocationParseError: Failed to p
arse: proxy_user:pwd

在这种情况下如何逃避角色#?

python pip http-proxy python-3.x

7
推荐指数
1
解决办法
4166
查看次数

在'NoneType'和'str'的实例之间不支持TypeError:'> ='

我已pycrypto按照给定的答案安装如下.

在此输入图像描述

但是,当我调试项目时,然后得到以下似乎相关的问题Crypto.

ModuleNotFoundError:没有名为'winrandom'的模块

在此输入图像描述

aut\token.py 第3行是

from jose.jwt import get_unverified_claims
Run Code Online (Sandbox Code Playgroud)

更新:1

然后,我运行pip install winrandom并得到以下错误.

在'NoneType'和'str'的实例之间不支持TypeError:'> ='

在此输入图像描述

更新:2

当我pip install --proxy http://XXXX:80 git+https://github.com/dlitz/pycrypto.git在工作环境中用代理(必需)命令建议的命令时,我得到一个连接拒绝错误,如下所示.

在此输入图像描述

python python-3.x

6
推荐指数
1
解决办法
3767
查看次数

标签 统计

python ×5

pip ×4

proxy ×2

python-3.x ×2

authentication ×1

http-proxy ×1

rhel ×1

tunnel ×1