簡體   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