0

When installing distribute-0.6.49 with python3.3.2 in Ubuntu system, error encountered

....blablabla followed by...

"Compression requires the (missing) zlib module")
RuntimeError: Compression requires the (missing) zlib module

I have checked previous solutions that I need to install zlib package, but Should I re install my python again before that? can't I install zlib over it?

If re-installing of python needed, Where can I find python 3.3 with zlib already therein so that i can install python as usual?

2
  • Was python installed from source or from a Ubuntu package? Commented Jul 27, 2013 at 15:51
  • from source, ubuntu by default had python 2.7, but i did python 3.3.2 from source Commented Jul 27, 2013 at 15:56

2 Answers 2

2

To compile Python with zlib support, you need to install the zlib1g-dev package so that Python can find the headers.

You'd need to re-install your source-compiled Python to take this along.

Sign up to request clarification or add additional context in comments.

14 Comments

you mean first I should install zlib1g-dev package separately before python , then install python version?
Yes; the python configure script won't be able to find the zlib include files otherwise.
is that? I already did tis just now, but still cant import zlib
No, that is not what I said. Use the Ubuntu package manager to install zlib1g-dev, then cd Python-3.3.0, ./configure --prefix=/opt/python3.3, make, sudo make install.
If you installed zlib from source too, you'd need to add the headers location to the python configure call; with the Ubuntu package that's not needed (as the headers can then be found in a standard location).
|
0

If you are running ubuntu then it is usually recomended that you use the package from the package manager. You can get python 3 - currently 3.3.1 with either sudo apt-get install python3 if I recall correctly or by using the software centre.

I am reasonably sure that the default distribution includes zlib.

Python 3.3.1 (default, Apr 17 2013, 22:30:32) 
[GCC 4.7.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import zlib
>>> exit()

1 Comment

in python3.3.1, zlib is already available?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.