When I start Python 2.7, I can import zlib
without a problem. Unfortunately, I need Python 2.6 for a specific project.
I tried installing it with this script I wrote:
apt-get install zlib1g-dev
mkdir /tmp/shell_scripts
cd /tmp/shell_scripts
wget http://www.python.org/ftp/python/2.6.9/Python-2.6.9.tgz
tar -xvzf Python-2.6.9.tgz
rm Python-2.6.9.tgz
cd Python-2.6.9
./configure --with-zlib
make
make install
./python setup.py install
cd /tmp
rm -r shell_scripts
When I type import zlib
, I get an import error. I need zlib
to install easy_install
. Have you an idea what could be wrong?