Mac pyenv install 3.7.2报错的一些问题

2019-07-30 20:00:32 浏览数 (2)

版权声明:Copyright © https://cloud.tencent.com/developer/article/1476322

系统 10.14.3

报错 Install failed, “zlib not available” on macOS Mojave

GitHub 上的解决方案

代码语言:javascript复制
Well, if you use the brew, zlib not available means that pyenv compilers can't find zlib header files. The brew has told you in brew info zlib that

For compilers to find zlib you may need to set:
export LDFLAGS="-L/usr/local/opt/zlib/lib"
export CPPFLAGS="-I/usr/local/opt/zlib/include"

so just execute

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

and then

pyenv install 3.7.1

There is another warning WARNING: The Python sqlite3 extension was not compiled. Missing the SQLite3 lib? also like this, execute

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

then install your version. Worked for me.

macOS Mojave 10.14.1
pyenv 1.2.8

0 人点赞