RuntimeError: Compression requires the (missing) zlib module (mavericks) on python install #20431
Comments
Can you temporarily test to locally add I guess, we have to add this xz to the deps. I should do this for Python 3.3, too, but didn't know pyhton 2.7.5 also needed this. |
Note on Mavericks: As of now, no homebrew core-member has enrolled for the Apple Developer Programm. |
No change with xz installed |
Ok, then revert your local changes. Sorry, I can just do wild guessing. Can you post the link to a gist.github.com with the output of
The message as shown above for me on 10.8.3 is perfectly fine because these modules don't build on Mac but I assume on your system other bits are missing and later to install distribute, the required module to unpack distribute is missing. Perhaps on 10.9 some lib has been removed/renamed? |
To get python2/python3 and pip3 installed and working on my system (10.9) I had to install and |
Python build finished, but the necessary bits to build these modules were not found: |
So zlib and _ssl and probably bsddb185 should be build but are not. Thanks for the info but I can't fix it right now because not having a Dev ID. |
Another user confirmed that the zlib dylib ( |
Misty is doing a blind remote surgery here :-) |
I can confirm that |
Uh, hm. You have Xcode 5.0 installed? Can you retry installing? |
Trashed prefs and reinstalled Xcode 5 DP. Same result. |
perhaps Xcode 5.0 is still kind of broken in that regard ... |
Afraid we can't offer support for this right now as we don't have access to 10.9 or Xcode 5.0. |
Reminder that problems in pre-release versions of OS X should be reported to Apple; there were some weird libs/headers issues in 10.8 previews that were fixed in the final release. |
❗ |
Just some note, it appears that CLI tools is now installed as part of the OS itself rather than with Xcode. I've found that clang/clang++ binary (and many binaries/lib that were present in CLI tools, but not all of it) now being installed as part of Essentials.pkg inside Mavericks' InstallESD.dmg. The whole /usr/include is not present in InstallESD. |
Please report it to Apple. |
That wasn't meant to be a bug report, just some note that CLI tools is now part of OS itself, rather than Xcode. Just to save someone's trouble if that person is trying to reinstall Xcode thinking something has gone wrong with his Xcode installation. :( |
Right, it's the Are there any release notes in Xcode or Mavericks that cover include locations, etc.? |
No, I don't see any release notes in Xcode nor in Mavericks. Thanks. |
This is where I found zlib.h: ./Applications/Xcode5-DP.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/libkern/zlib.h
./Applications/Xcode5-DP.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/zlib.h I can verify that this path does have the standard headers: AssertMacros.h ifaddrs.h ranlib.h
Availability.h inttypes.h readline/
AvailabilityInternal.h iso646.h readpassphrase.h
AvailabilityMacros.h kern/ regex.h
Block.h krb5/ removefile.h
CommonCrypto/ krb5.h resolv.h
ConditionalMacros.h langinfo.h rpc/
MacTypes.h launch.h rpcsvc/
NSSystemDirectories.h lber.h rune.h
TargetConditionals.h lber_types.h runetype.h
Xplugin.h ldap.h sandbox.h
_locale.h ldap_cdefs.h sasl/
_structs.h ldap_features.h sched.h
_types/ ldap_schema.h search.h
_types.h ldap_utf8.h secure/
_wctype.h ldif.h security/
_xlocale.h libc.h semaphore.h
aio.h libcharset.h servers/
aliasdb.h libexslt/ setjmp.h
alloca.h libgen.h sgtty.h
apache2/ libkern/ signal.h
apr-1/ libproc.h slapi-plugin.h
ar.h libunwind.h spawn.h
architecture/ libxml2/ sqlite3.h
arpa/ libxslt/ sqlite3ext.h
asl.h limits.h stab.h
assert.h localcharset.h standards.h
bitstring.h locale.h stdbool.h
bootparams.h mach/ stddef.h
bsm/ mach-o/ stdint.h
bzlib.h mach_debug/ stdio.h
c++/ machine/ stdlib.h
cache.h malloc/ strhash.h
cache_callbacks.h math.h string.h
checkint.h membership.h stringlist.h
com_err.h memcached/ strings.h
complex.h memory.h struct.h
copyfile.h menu.h sys/
cpio.h miscfs/ sysexits.h
crt_externs.h module.map syslog.h
ctype.h monetary.h tar.h
cups/ monitor.h tcl.h@
curl/ mpool.h tclDecls.h@
curses.h nameser.h tclPlatDecls.h@
cxxabi.h nc_tparm.h tclTomMath.h@
db.h ncurses.h@ tclTomMathDecls.h@
default_pager/ ncurses_dll.h term.h
device/ ndbm.h term_entry.h
dirent.h net/ termcap.h
disktab.h net-snmp/ termios.h
dispatch/ netdb.h tic.h
dlfcn.h netinet/ tidy/
dns.h netinet6/ time.h
dns_sd.h netkey/ timeconv.h
dns_util.h nfs/ tk.h@
dtrace.h nl_types.h tkDecls.h@
editline/ nlist.h tkIntXlibDecls.h@
err.h notify.h tkMacOSX.h@
errno.h notify_keys.h tkPlatDecls.h@
eti.h ntsid.h ttyent.h
execinfo.h objc/ tzfile.h
expat.h odmodule/ ucontext.h
expat_external.h openssl/ ulimit.h
fcntl.h os/ unctrl.h
fenv.h panel.h unistd.h
ffi/ paths.h unwind.h
fmtmsg.h pcap/ util.h
fnmatch.h pcap-bpf.h utime.h
form.h pcap-namedb.h utmp.h
fsproperties.h pcap.h utmpx.h
fstab.h pexpert/ uuid/
fts.h php/ vfs/
ftw.h poll.h vis.h
get_compat.h printerdb.h vproc.h
gethostuuid.h printf.h wchar.h
getopt.h profile.h wctype.h
glob.h protocols/ wordexp.h
grp.h pthread.h xar/
gssapi/ pthread_impl.h xlocale/
gssapi.h pthread_spis.h xlocale.h
hfs/ pwd.h xpc/
histedit.h python2.5@ zconf.h
i386/ python2.6@ zlib.h
iconv.h python2.7@ |
Xcode 5 no longer installs headers in |
Does anybody know why Homebrew is able to find the correct include paths on 10.8 but not on 10.9 ? Any ideas / guesses? |
If the user has the command line tools installed on 10.7 and 10.8, then the headers are installed to the standard |
Yes, but somebody mentioned, that even if the user did not install the command line tools, it works on 10.8. |
That is because on 10.8 we worked hard to make homebrew (99%) work with either the CLT only and Xcode-only. @clemensg you can |
@samueljohn Thank you! Should the same strategy, which is used for Xcode-only on 10.8, now be used as default on 10.9 instead of using /usr/include ? |
Just to reiterate what Adam said earlier:
So if changes are made for 10.9 here, let's try to keep them (a) minimal and (b) well-documented, as it is not unlikely the situation will change by the time the final release is made. |
Until Homebrew pulls my pull request or fixes it in any other way, you could all use my mavericks branch or apply the last commit as patch to your local repository: https://github.com/clemensg/homebrew/tree/mavericks |
For anyone else who encounters this issue, the temporary fix is:
|
Apple developer has informed me that rdar://14129396 has been "fixed" as of Xcode 5 DP5. You will need to install CLI tools for Xcode 5 (which make
Python installation went through just fine after doing so (not sure if this is a result of any changes in Homebrew though...) |
I bumped into a similar (the same?) problem setting up a handful of clean 10.8.4 (current Mountain Lion) macs. Homebrew can't find
As noted above, there are several copies of zlib.h littered about inside the Xcode bundle SDKs, before installing the command line tools, I copied the last of the following into
|
@joemaller that is strange, as I can install python with the zlib module on 10.8.4 with Xcode-only (no CLTs). |
@joemaller if this is happening on Mountain Lion, please open a separate issue, with full troubleshooting information; this issue is specifically about 10.9 and though the zlib error may seem the same, it almost certainly has a different cause (since Python is known to compile on 10.8). |
Closing since @sirn reports this may be fixed in DP5. Certainly after 10.9 is released we'll update Hombrew to work well with it. |
I don't think it's necessary to reopen this issue, but I encountered the same problem using GM seeds of both os 10.9 and Xcode (5.0.1). I ran: |
That works for me too, thanks @johngoodleaf ! |
|
|
Maybe we should reopen this. Looks like the basic problem occurs with some frequency. Could it warrant at least an advisory note when running brew? |
|
Sorry! I didn't check before sounding off. |
@johngoodleaf No worries. |
Well, sorry to bump here, but finding it was really hard and brew doctor never mentioned something easy cake as : Thanks ! |
👍 another bump here-- this took quite a bit to track down. Thanks for the fix, and it'd be awesome to have it in |
I can also confirm installing latest command line tools for xcode on maverick fixes this issue. |
Issue crops up again in Yosemite though :) I am trying the force link workaround as mentioned above. |
force link solution works in Yosemite :) |
I just installed Yosemite and use the force link solution, but that didn't fix the issue for me. does anyone know what else could help? |
brew link --force zlib
brew link --force openssl This does not work in Yosemite for me too. |
Yosemite users, if your |
$ brew install python
==> Downloading http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tar.bz2
Already downloaded: /Library/Caches/Homebrew/python-2.7.5.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/python/2.7.5 --enable-ipv6 --datarootdir=/usr/local/Cellar/python/2.7.5/share --datadir=/usr/local/Cellar/python/2
==> make
==> make install PYTHONAPPSDIR=/usr/local/Cellar/python/2.7.5
==> make frameworkinstallextras PYTHONAPPSDIR=/usr/local/Cellar/python/2.7.5/share/python
==> Downloading https://pypi.python.org/packages/source/d/distribute/distribute-0.6.45.tar.gz
Already downloaded: /Library/Caches/Homebrew/distribute-0.6.45.tar.gz
==> /usr/local/Cellar/python/2.7.5/bin/python2 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/2.7.5/bin --ins
File "/private/tmp/UNKNOWN-lV8C/distribute-0.6.45/setuptools/command/bdist_egg.py", line 540, in make_zipfile
z = zipfile.ZipFile(zip_filename, mode, compression=compression)
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.py", line 732, in init
"Compression requires the (missing) zlib module"
RuntimeError: Compression requires the (missing) zlib module
The text was updated successfully, but these errors were encountered: