Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zipimport.ZipImportError: can't decompress data; zlib not available #10

Open
program-spiritual opened this issue Feb 27, 2019 · 1 comment
Labels
帮助通告 需要特别注意

Comments

@program-spiritual
Copy link
Owner

Fix

安装 zlib

brew install zlib

添加如下内容到 ~/.zshrc (如果存在zsh)

the following content partly from the output of brew install zlib

DO NOT FORGET TO ADD ${LDFLAGS}, ${CPPFLAGS}, ${PKG_CONFIG_PATH} !

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

# For pkg-config to find zlib you may need to set:
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH} /usr/local/opt/zlib/lib/pkgconfig"
@program-spiritual program-spiritual added the 帮助通告 需要特别注意 label Mar 2, 2019
@program-spiritual
Copy link
Owner Author

上述方法莫名失败了,这种可以:

WARNING: The Python sqlite3 extension was not compiled. Missing the SQLite3 lib?
zipimport.ZipImportError: can't decompress data; zlib not available

配置临时变量:

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"

这样,zlib 的问题和 Sqlite3 的问题都会解决了。

其他问题请看

https://github.com/pyenv/pyenv/wiki/common-build-problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
帮助通告 需要特别注意
Projects
None yet
Development

No branches or pull requests

1 participant