Lösung für MacOS Catalina (10.15.2), bei der Python Pip einen OpenSSL-Fehler in einer Umgebung verursacht, die von einem älteren Betriebssystem aktualisiert wurde

TL;DR Ändern Sie / Library / Developer / CommandLineTools in mv wie CommandLineTools.bak und führen Sie xcode-select --install aus.

Warum so?

Es scheint, dass die Befehlszeilentools, die vor dem Upgrade auf Catalina enthalten waren, fälschlicherweise als neu erkannt werden, obwohl sie alt sind. Selbst wenn Sie "xcode-select --install" ausführen, wird Ihnen "bereits installiert" mitgeteilt. Um es wieder zu erzwingen.

Es wurden verschiedene Korrekturmethoden geschrieben, aber keine davon war relevant

Das Folgende war irrelevant.

Problem Fehlerzeichenfolge

$ pip install --upgrade pip
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Retrying (Retry(total=4, 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 avai
lable.")': /simple/pip/
Retrying (Retry(total=3, 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 avai
lable.")': /simple/pip/
Retrying (Retry(total=2, 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 avai
lable.")': /simple/pip/
Retrying (Retry(total=1, 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 avai
lable.")': /simple/pip/
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 avai
lable.")': /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 ur
l: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
Requirement already up-to-date: pip in /usr/local/lib/python3.7/site-packages (18.1)
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 ur
l: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

Ist das Brauen schlecht oder MacOS schlecht ...

Es scheint einfacher zu sein, dies mit Cloud Shell (GCP) zu tun. Ich kann weinen

Recommended Posts

Lösung für MacOS Catalina (10.15.2), bei der Python Pip einen OpenSSL-Fehler in einer Umgebung verursacht, die von einem älteren Betriebssystem aktualisiert wurde
Lösung für Pip-Installationsfehler [Python] [Mac]
Python-Entwicklungsumgebung für macOS mit venv 2016
Lösung für Laufzeitfehler in OpenVINO IEPlugin.load ()
Einführung von sip-4.14 in der Python3.2.2-Umgebung mit MacOS 10.7.4
[Hinweis] Die Lösung für die, bei der Python beim Importieren von Hashlib unter MacOSX zu einem Fehler wird
CERTIFICATE_VERIFY_FAILED in Python 3.6, dem offiziellen Installationsprogramm für macOS
"Temporäre Lösung", wenn pip nicht aktualisiert werden kann [Python]
Verwenden Sie Python in Ihrer Umgebung von Win Automation
Installieren Sie Python und Bibliotheken für Python unter MacOS Catalina