开发者

Zlib not available in OS X?

I am trying to install a python library and receive this error after downloading an egg file.

Downloading http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c7-py2.5.egg
Traceback (most recent call last):
  File "setup.py", line 10, in <module>
    use_setuptools(min_version=min_version)
  File "/Users/tylo/Downloads/Archives/simplejson-2.0.开发者_如何学Go9/ez_setup.py", line 88, in use_setuptools
    import setuptools; setuptools.bootstrap_install_from = egg
zipimport.ZipImportError: can't decompress data; zlib not available

I did some research and discovered that zlib is built into OS X.

What could be going wrong here?


Run xcode-select --install to fix installation of Command Line Tools for Xcode working.


It's not the zlib C library that is missing, but the zlib Python module. This is usually caused by compiling Python yourself, and not having the necessary bits (header files, specifically) of zlib available, even when you do have the C library available. Or, sometimes, by the zlib Python module having the wrong permissions; take a look in the directories in sys.path, looking for a zlib.so or zlibmodule.so. If it doesn't exist, the Python installation was built without it, or building it failed. If it does exist, check its permissions (and the directory's permissions.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜