ImportError: zlib not found

34 views
Skip to first unread message

Terrence Brannon

unread,
Oct 22, 2008, 6:15:00 AM10/22/08
to stac...@stackless.com, nagare...@googlegroups.com
Hello, I need zlib under Stackless Python (because virtualenv uses it).

import zlib doesnt says 'No module named zlib' under stackless but not under
normal Python.

I have tried this with the 2.6 and 2.52 versions of Stackless on ubuntu (running on virtualbox) with no success:

terrence@terrence-laptop ~/downloads/stackless-26-export : python
Python 2.6 Stackless 3.1b3 060516 (trunk, Oct 22 2008, 05:58:25)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import zlib
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
ImportError: No module named zlib
>>> import sys
>>> sys.path
['', '/usr/local/lib/python26.zip', '/usr/local/lib/python2.6', '/usr/local/lib/python2.6/plat-linux2', '/usr/local/lib/python2.6/lib-tk', '/usr/local/lib/python2.6/lib-old', '/usr/local/lib/python2.6/lib-dynload', '/usr/local/lib/python2.6/site-packages']
>>>
terrence@terrence-laptop ~/downloads/stackless-26-export : find /usr/local/lib/python2.6 -name '*zlib*'
/usr/local/lib/python2.6/test/test_zlib.py
/usr/local/lib/python2.6/test/test_zlib.pyc
/usr/local/lib/python2.6/test/test_zlib.pyo
/usr/local/lib/python2.6/encodings/zlib_codec.pyo
/usr/local/lib/python2.6/encodings/zlib_codec.py
/usr/local/lib/python2.6/encodings/zlib_codec.pyc
terrence@terrence-laptop ~/downloads/stackless-26-export :


-- 
Non-linear floating words - http://groups.google.com/group/odd-musings
Ambient floating blog - http://ohfloat.com
Floating mindmap - http://static.livingcosmos.org/super-scio/floating/
The mothership - http://www.LivingCosmos.org

Laurent Rahuel

unread,
Oct 22, 2008, 6:43:44 AM10/22/08
to nagare...@googlegroups.com
Hi Terrence,

I guess you build your Stackless python from sources. You may need to
install some devel packages in order to get zlib support within Stackless.

First of all, on a debian based system, you'll need to install this
pakages prior Stackless build.

For example on a debian based system, you'll need libc6-dev
linux-libc-dev zlib1g-dev libxml2-dev libxslt1-dev

Don't forget to build your Stackless python once again when these system
dependencies will be available.

Regards,

Laurent


Terrence Brannon a écrit :

Terrence Brannon

unread,
Oct 22, 2008, 10:21:51 AM10/22/08
to Henk Punt, stac...@stackless.com, nagare...@googlegroups.com
Henk Punt wrote:
> On Ubuntu I found out I had to include --with-zlib to configure before
>

AHA!!!!! zlib1g-dev is what I needed


Thank you very much.

Reply all
Reply to author
Forward
0 new messages