Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 5, in
from pkg_resources import load_entry_point
zipimport.ZipImportError: can't decompress data; zlib not available
Seen this when working with python on OS X 10.6 (Snow Leopard)?
This seemingly came out of nowhere when I wanted to set up a virtualenv on a macbook pro that hadn’t been used for python recently.
I tried all sorts of approaches to deal with the pesky zlib to no avail.
What finally worked was rm-ing the .virtualenv dir in my user home dir and removing all references to that directory in my .bashrc.
I then reinstalled setuptools and was able to get easy_install and pip running following that.
If you’re seeing that error coming up it may be problems with your shell initialization sequence. Check it out!