![Beim Upgrade des Mac von High Sierra auf Catalina ist „import pycurl“ kaputt gegangen](https://rvso.com/image/1606685/Beim%20Upgrade%20des%20Mac%20von%20High%20Sierra%20auf%20Catalina%20ist%20%E2%80%9Eimport%20pycurl%E2%80%9C%20kaputt%20gegangen.png)
Ich habe meinen Mac von High Sierra auf Catalina aktualisiert, aber das ging kaputt import pycurl
. Siehe Fehler unten.
Ich habe alle Optionen ausprobiert, von denen die Benutzer behaupteten, sie seien in diesem Fall erfolgreich gewesenBeitrag über Stapelüberlaufaber vergeblich.
ImportError: pycurl: libcurl link-time ssl backend (none/other) is different from compile-time ssl backend (openssl)
Meine Pycurl-Version ist7.43.0.3
Python-Version ist3.6.4.
[Ich habe es auch mit Catalina 1.0.2t versucht und dann libressl
unten ausprobiert]
% openssl version -a
LibreSSL 2.8.3
built on: date not available
platform: information not available
options: bn(64,64) rc4(16x,int) des(idx,cisc,16,int) blowfish(idx)
compiler: information not available
OPENSSLDIR: "/private/etc/ssl"
% echo $PYCURL_SSL_LIBRARY
openssl
% echo $LDFLAGS
-L/usr/local/opt/openssl/lib
% echo $CPPFLAGS
-I/usr/local/opt/openssl/include
Ich habe alle oben genannten Befehlskombinationen ausprobiert:
% pip install --global-option="--with-openssl" --global-option=build_ext --global-option="-L/usr/local/opt/openssl/lib" --global-option="-I/usr/local/opt/openssl/include --compile --no-cache-dir" pycurl
% brew uninstall openssl
usw.
Ich habe easy_install verwendet.
Aber es ist einfach eingebrochenCatalina!!Hat das schon jemand gelöst?
Antwort1
Das Folgende hat bei mir funktioniert, obwohl es ein bisschen hackig erscheint. Vielleicht machen Sie damit weiter, bis eine bessere Lösung kommt?
brew install curl-openssl
export PYCURL_SSL_LIBRARY=openssl
export PYCURL_CURL_CONFIG=/usr/local/opt/curl-openssl/bin/curl-config
export LDFLAGS='-L/usr/local/opt/openssl/lib -L/usr/local/opt/c-ares/lib -L/usr/local/opt/nghttp2/lib -L/usr/local/opt/libmetalink/lib -L/usr/local/opt/rtmpdump/lib -L/usr/local/opt/libssh2/lib -L/usr/local/opt/openldap/lib -L/usr/local/opt/brotli/lib'
export CPPFLAGS=-I/usr/local/opt/openssl/include
pip install pycurl --compile --no-cache-dir
macOS 10.15 Python 3.7.4 pycurl 7.43.0.3 OpenSSL 1.0.2t
Antwort2
Das hat bei mir funktioniert
pip uninstall pycurl
pip install --compile --install-option="--with-openssl" pycurl
Antwort3
Ich verwende MacOS Ventura auf meinem MacBook Pro. Wir verwenden Python 3.7. Folgendes hat bei mir funktioniert:
% python3.7 -m pip uninstall pycurl
% brew install curl
% brew install openssl
% export LDFLAGS="-L/usr/local/opt/curl/lib $LDFLAGS"
% export CPPFLAGS="-I/usr/local/opt/curl/include $CPPFLAGS"
% export PKG_CONFIG_PATH=/usr/local/opt/curl/lib/pkgconfig
% python3.7 -m pip install pycurl==7.45.2 --no-cache-dir --compile --ignore-installed --install-option="--openssl-dir=/usr/local/opt/openssl@3/"