ImportError: No module named zlib + Virtualenv.py

Posted 12 January 2013 - 08:22 AM

Virtualenv.py complains even after I have installed the zlib development packages, restarted the terminal and rebooted the computer. What is going on with Mint14? Because I'm following the exact same setup instructions as when I was using Debian Squeeze.

Replies To: ImportError: No module named zlib + Virtualenv.py

Re: ImportError: No module named zlib + Virtualenv.py

Posted 12 January 2013 - 04:46 PM

Counter question: Your built-in python version is 2.7 but you want to use 2.4.x?

Not entirely sure that what I am saying now is correct:
Doesn't seem a virtualenv problem. To use zlib python has to be compiled with zlib activated. In python 2.5 it was deactivated by default (so probably also for 2.4). Maybe you need to compile python 2.4 yourself with zlib activated.

Re: ImportError: No module named zlib + Virtualenv.py

Posted 13 January 2013 - 10:52 AM

Nallo, on 13 January 2013 - 12:46 AM, said:

Counter question: Your built-in python version is 2.7 but you want to use 2.4.x?

As a Python newbie and newbie programmer I've disovered that the Django tutorials are written differently for different Django versions. Which forces the reader to have a specific Python version on their computer.
I was on Debian before which uses a much older Python version than Ubuntu and Mint.

Then I discovered that most shared webhosts also uses older Python versions. I trust my webhost's services more than I do some other shared webhosts that offers a better Python experience. So I'm reluctant to switch webhost.

So I guess my answer to your counter question: Is that I'm trying to prepare myself for the future when Python 2.7 gets old and everybody uses Python 3. Except for webhosts and companies who are still stuck with using older Python versions.

I want the power of choice, therefore I'm doing what may seem crazy to the common man. />

Nallo, on 13 January 2013 - 12:46 AM, said:

Not entirely sure that what I am saying now is correct:
Doesn't seem a virtualenv problem. To use zlib python has to be compiled with zlib activated. In python 2.5 it was deactivated by default (so probably also for 2.4). Maybe you need to compile python 2.4 yourself with zlib activated.

Yes you were correct I had to enable zlib library in "~/usr-32/Python-2.4.6/Modules/Setup" to solve this specific problem.

However as I continued my fight against all the remaining errors thrown at me I finally hit the wall. So it seems like I'm not able to pip install 'django==1.3' anymore, or don't have to deal with Django 1.3 anymore. One less problem to care about in the future perhaps.