繁体   English   中英

Python 2.7 PIP 安装以使用 Artifactory 作为代理

[英]Python 2.7 PIP install to use Artifactory as proxy

我已将 Jfrog Artifactory 配置为 PIP 模块的远程仓库。 当我在 Centos 7 操作系统上安装pexcept模块时,它使用 Artifactory 代理下载,但它给出了以下错误消息。 它还试图连接https://pypi.python.org/pypi/pip/json网站。

修复以下错误的任何提示? 另外,我如何强制 pip 命令始终使用内部 Artifacotry 代理而不直接连接任何外部存储库。

Requirement already satisfied (use --upgrade to upgrade): ptyprocess>=0.5 in /usr/lib/python2.7/site-packages (from pexpect)
Installing collected packages: pexpect
  Compiling /tmp/pip-build-bKzDu5/pexpect/pexpect/_async.py ...
    File "/tmp/pip-build-bKzDu5/pexpect/pexpect/_async.py", line 20
      transport, pw = yield from asyncio.get_event_loop()\
                               ^
  SyntaxError: invalid syntax


Successfully installed pexpect-4.7.0
Cleaning up...
Looking up "https://pypi.python.org/pypi/pip/json" in the cache
No cache entry available
Starting new HTTPS connection (1): pypi.python.org
There was an error checking the latest version of pip
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pip/utils/outdated.py", line 126, in pip_version_check
    headers={"Accept": "application/json"},
  File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 487, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python2.7/site-packages/pip/download.py", line 378, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 585, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.py", line 46, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/adapters.py", line 467, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /pypi/pip/json (Caused by NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f5c16190d10>: Failed to establish a new connection: [Errno 97] Address family not supported by protocol',))

远程站点设置:

在此处输入图像描述

我目前正在为此目的使用人工制品。 我确实发现有些包没有很好地解决。 更改为https://files.pythonhosted.org作为注册表 URL 后,一切都到位了。

我的其他设置是

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM