1. 程式人生 > >ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?

ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?

log extension -m ins clas mac problem nbsp style

官方已經給出解決方案:https://github.com/pyenv/pyenv/wiki/Common-build-problems#error-the-python-ssl-extension-was-not-compiled-missing-the-openssl-lib

在Mac上且用homebrew裝了openssl的情況下,命令行如下:

CFLAGS="-I$(brew --prefix openssl)/include" LDFLAGS="-L$(brew --prefix openssl)/lib" pyenv install -v 3.6.2

再補充一句,pyenv前面不要加sudo。否則編譯仍舊報錯通不過。

ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?