首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Python2.7 PIP安装以Artifactory为代理

Python2.7 PIP安装以Artifactory为代理
EN

Stack Overflow用户
提问于 2019-11-19 13:13:02
回答 1查看 656关注 0票数 0

我已经将配置为PIP模块的远程回购。当我在Centos 7操作系统上安装pexcept模块时,它使用Artifactory代理下载,但是它提供了下面的错误消息。此外,它还试图连接网站。

有什么小提示可以修正以下错误吗?此外,我如何强制pip命令使用始终内部的Artifacotry代理,而不是直接连接任何外部回购。

代码语言:javascript
复制
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',))

远程站点设置:

EN

回答 1

Stack Overflow用户

发布于 2019-11-19 13:20:16

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

我的其他设置是

https://files.pythonhosted.org

  • Registry布局simple-layout

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58934948

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档