zhyq0826 / zhyq0826.github.io

三月沙的博客
http://sanyuesha.com
6 stars 1 forks source link

python 3 mac #135

Closed zhyq0826 closed 5 years ago

zhyq0826 commented 5 years ago

python3 在 mac 上编译出现错误,一个是 openssl 一个是 zlib

open ssl

$ brew --prefix openssl
/usr/local/opt/openssl
./configure CPPFLAGS="-I/usr/local/opt/openssl/include" LDFLAGS="-L/usr/local/opt/openssl/lib"

zlib

brew info zlib
 export LDFLAGS="-L/usr/local/opt/zlib/lib"
 export CPPFLAGS="-I/usr/local/opt/zlib/include"

重新编译安装

https://github.com/pyenv/pyenv/wiki/Common-build-problems#build-failed-error-the-python-zlib-extension-was-not-compiled-missing-the-zlib