These are chat archives for ethereum/pydevp2p

Mar 2016
Aiman Baharna
Mar 02 2016 12:29

Installing pydevp2p is broken on Ubuntu 14.04 LTS, which also breaks pyethapp... It cannot install secp256k1

$ pip install devp2p==0.7.0
Downloading/unpacking secp256k1 (from devp2p==0.7.0)
  Downloading secp256k1-0.12.0.tar.gz (144kB): 144kB downloaded
  Running (path:/tmp/pip_build_root/secp256k1/ egg_info for package secp256k1
    Your setuptools version (3.3) is too old to correctly install this package. Please upgrade to a newer version.
    Complete output from command python egg_info:
    Your setuptools version (3.3) is too old to correctly install this package. Please upgrade to a newer version.

...but devp2p==0.6.2 works fine.

Mar 02 2016 14:50
@czepluch ----^
Jacob Stenum Czepluch
Mar 02 2016 16:53
@aiman Have you tried updating setuptools as suggested?
Aiman Baharna
Mar 02 2016 19:17

@czepluch Thanks for looking in to this.

Upgrading setuptools is certainly one approach, but it is a rather extreme solution!

I would expect that most Python packages will work out of the box for the current LTS version of most distros. Are the benefits of requiring a new setuptools version really worth breaking the ability to install the package easily on the LTS version of major distros? I'm not convinced of that. I think having to upgrade setuptools should be an option of last resort.

Besides, upgrading setuptools systemwide is not a good idea. Most people will get python-setuptools from their distro's package manager. And it is unwise to use sudo pip to upgrade a Python package installed using the distro package manager. This can lead to a broken system. In addition, at least on Ubuntu pip will now detect this situation and refuse to upgrade setuptools in the first instance.

What this means is that I am forced to use a virtualenv to install pyethapp. But this is not great because it complicates deployment when using containers, where there is no need to use a virtualenv.

As for actually using a virtualenv to install pydevp2p, installation fails due to a new problem:

(venv)$ pip install devp2p==0.7.0
     /bin/mkdir -p '/home/docker/venv/build/secp256k1/build/temp.linux-x86_64-2.7/include'
     /usr/bin/install -c -m 644 /home/docker/venv/build/secp256k1/libsecp256k1/include/secp256k1.h /home/docker/venv/build/secp256k1/libsecp256k1/include/secp256k1_recovery.h '/home/docker/venv/build/secp256k1/build/temp.linux-x86_64-2.7/include'
     /bin/mkdir -p '/home/docker/venv/build/secp256k1/build/temp.linux-x86_64-2.7/lib/pkgconfig'
     /usr/bin/install -c -m 644 libsecp256k1.pc '/home/docker/venv/build/secp256k1/build/temp.linux-x86_64-2.7/lib/pkgconfig'
    make[1]: Leaving directory `/home/docker/venv/build/secp256k1/build/temp.linux-x86_64-2.7'
    error: [Errno 2] No such file or directory
Command /home/docker/venv/bin/python -c "import setuptools, tokenize;__file__='/home/docker/venv/build/secp256k1/';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-rDGr8l-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/docker/venv/include/site/python2.7 failed with error code 1 in /home/docker/venv/build/secp256k1
Storing debug log for failure in /home/docker/.pip/pip.log

Full log available at

Jacob Stenum Czepluch
Mar 02 2016 19:23
Thank you for detailed explanation and view points. I do agree that this should only be a last resort. I must admit that I am a bit busy at the moment and won't have time to look further into this before tomorrow evening. Maybe @ulope can help you in the meantime. If not, I will come back to you tomorrow. I hope you can wait until then.
Aiman Baharna
Mar 02 2016 19:28
Thank you @czepluch. It will be good to fix this issue in due course. But there is no need to rush it. I put together a Dockerfile to reproduce the issue I am seeing with the virtualenv.
Jacob Stenum Czepluch
Mar 02 2016 19:29
@aiman thank you!
Ulrich Petri
Mar 02 2016 19:31
@aiman I'll be looking into this tomorrow. We need a "relatively" new setuptools in order for the automatic building of libsecp256k1 to work. I don't know of the top of my head if it can work with 14.04's setuptools version. Having said that using a virtualenv is strictly the most reliable way to get a properly working installation. I'll be looking into the failure you're getting in the doker case tomorrow as well.
Jacob Stenum Czepluch
Mar 02 2016 19:34