首页 > 解决方案 > 什么是 https://pypi.python.org/pypi/pip/json,我为什么需要它?

问题描述

我为 artifactory 配置了 Python3 安装,因为我的服务器超出了防火墙,我没有机会访问 pypi.python.org。安装包“成功”,但最后我得到错误:

...
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 "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/connection.py", line 142, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py", line 98, in create_connection
    raise err
  File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py", line 88, in create_connection
    sock.connect(sa)
OSError: [Errno 101] Network is unreachable

During handling of the above exception, another exception occurred:

我将 pip3 配置为使用 artifactory,它可以访问包,但安装不是 100% 正确。

$ cat ~/.pip/pip.conf
[global]
index-url = https://artifactory/api/pypi/pypi-remote/simple

[index]
index-url = https://artifactory/api/pypi/pypi-remote/simple

还有什么要配置的吗?或者它是一个点错误?我使用 RHEL7 SCL 安装中的 pip 9.0.1

标签: pythonpipartifactory

解决方案


推荐阅读