【发布时间】:2019-08-29 23:18:26
【问题描述】:
当我尝试在 MacOS Mojave 上安装 pip 时出现下一个错误
我尝试使用
解决它$ brew install python
但它不起作用
$ python --version
Python 3.7.4
$ sudo python get-pip.py
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting pip
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement pip (from versions: none)
ERROR: No matching distribution found for pip
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
【问题讨论】:
-
这对我来说似乎很离谱。 Homebrew 中的 Python 3 肯定带有 ssl 支持。而且我很确定它也安装了一个 pip 版本。虽然它们被称为 python3 和 pip3。
标签: python python-3.x macos pip