关于python:ssl错误为什么用pip安装

ssl error why installing with pip

我正在尝试用pip安装pyobjc。但是每次运行它,我都会得到这个错误。一些论坛说要使用——作为一种解决办法值得信任,但它仍然不起作用。我的电脑是Mac OS Sierra版本10.12.6

我的命令:

1
$ sudo pip install pyobjc-framework-Quartz

Collecting pyobjc-framework-Quartz Retrying (Retry(total=4,
connect=None, read=None, redirect=None, status=None)) after connection
broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED]
certificate verify failed (_ssl.c:833)'),)':
/simple/pyobjc-framework-quartz/ Retrying (Retry(total=3,
connect=None, read=None, redirect=None, status=None)) after connection
broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED]
certificate verify failed (_ssl.c:833)'),)':
/simple/pyobjc-framework-quartz/ Retrying (Retry(total=2,
connect=None, read=None, redirect=None, status=None)) after connection
broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED]
certificate verify failed (_ssl.c:833)'),)':
/simple/pyobjc-framework-quartz/ Retrying (Retry(total=1,
connect=None, read=None, redirect=None, status=None)) after connection
broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED]
certificate verify failed (_ssl.c:833)'),)':
/simple/pyobjc-framework-quartz/ Retrying (Retry(total=0,
connect=None, read=None, redirect=None, status=None)) after connection
broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED]
certificate verify failed (_ssl.c:833)'),)':
/simple/pyobjc-framework-quartz/ Could not fetch URL
https://pypi.python.org/simple/pyobjc-framework-quartz/: There was a
problem confirming the ssl certificate:
HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries
exceeded with url: /simple/pyobjc-framework-quartz/ (Caused by
SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate
verify failed (_ssl.c:833)'),)) - skipping Could not find a version
that satisfies the requirement pyobjc-framework-Quartz (from versions:
) No matching distribution found for pyobjc-framework-Quartz


可以使用以下命令运行:

1
sudo pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org pyobjc-framework-Quartz