2

I looked here but I am not getting a lot out of the answer:

A big reason for this is because I am a new Linux user and I haven't seen all the commands in action yet. I have the exact same problem as this guy but all the responses are too advanced for me right now to understand what exactly it is I need to do.

I am using Linux Ubuntu 14.04 and I am trying to generate a genesis block to play around with Ethereum and smart contracts. I'm following this tutorial and when I'm at the point of putting this in my console:

sudo python get-pip.py

I get this error:

zipimport.ZipImportError: can't decompress data; zlib not available

It is my understanding that this has to do with Python not being built with zip support. This may well be the case as I had no idea what I was doing when trying to install Python. What I have done to try and resolve this is to install the latest version of zlib and try it again, but when I tried it again, I still got the same error. I re-installed Python, and I'm still getting the same error. Now, I'm just getting annoyed. What can I do to fix this issue?

1

2 Answers 2

3

Looks like you built your Python yourself and not using the default installation. You need to do these steps:

  1. Install the zlib the newest version

  2. Then complie python again and run a line

    ./configure --prefix=/root/Python-2.7.8 --with-zlib-dir=/usr/local/lib
    
8
  • I guess I need help with compiling a new version of python. Actually, this is an answer that you copy + pasted directly from one of the links that I put in my question. I tried re-installing python and installing the newest version of zlib, but I am still getting the same error. Aug 13, 2015 at 16:11
  • actually it was answered by pip developer in this link github.com/pypa/pip/issues/1919 Aug 13, 2015 at 16:13
  • Which is the exact same link I posted. (Check second link) Aug 13, 2015 at 16:14
  • can you send me the respone to which zlib and which python ? Aug 13, 2015 at 16:36
  • zlib version 1.2.8 and python 2.7.1 Aug 13, 2015 at 19:59
0

you can try this:

  1. edit the file Modules/Setup.dist

  2. find this

    #zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz 
    
  3. unmask #

  4. try again!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .