Sie können die bestehende Python-Installation nicht erneut verknüpfen und müssen eine andere Python-Distribution aus dem Quellcode erstellen. Wenn Python bauen, müssen Sie anpassen CPPFLAGS
, LDFLAGS
und LD_LIBRARY_PATH
env Variablen. Angenommen, Sie haben die benutzerdefinierte OpenSSL in installiert /path/to/openssl
:
$ cd /path/with/Python/sources/unpacked/ $ export LDFLAGS="-L/path/to/openssl/lib/ -L/path/to/openssl/lib64/" $ export LD_LIBRARY_PATH="/path/to/openssl/lib/:/path/to/openssl/lib64/" $ export CPPFLAGS="-I/path/to/openssl/include -I/path/to/openssl/include/openssl" $ ./configure --prefix=/path/to/custom/python/ $ make $ make install
Jetzt verwendet Python in /path/to/custom/python/
die benutzerdefinierte OpenSSL:
$ /path/to/custom/python/bin/python -c "import ssl; print(ssl.OPENSSL_VERSION)" OpenSSL 1.1.0h 27 Mar 2018