6

Was trying to install pyethapp since want to work with ETH from python. But cant install secp256k1 dependence no matter what I tried.

I'm using OS X 10.11.4 and Python 2.7.10 (tried 3.5.1 as well)

Full log look like this (after pip install devp2p):

Collecting devp2p
  Using cached devp2p-0.7.1-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): coverage in /Users/yanik/code/crypto_tickets/env2/lib/python2.7/site-packages (from devp2p)
Requirement already satisfied (use --upgrade to upgrade): pycryptodome>=3.3.1 in /Users/yanik/code/crypto_tickets/env2/lib/python2.7/site-packages (from devp2p)
Requirement already satisfied (use --upgrade to upgrade): ipaddress in /Users/yanik/code/crypto_tickets/env2/lib/python2.7/site-packages (from devp2p)
Requirement already satisfied (use --upgrade to upgrade): gevent>=1.1.0 in /Users/yanik/code/crypto_tickets/env2/lib/python2.7/site-packages (from devp2p)
Requirement already satisfied (use --upgrade to upgrade): wheel in /Users/yanik/code/crypto_tickets/env2/lib/python2.7/site-packages (from devp2p)
Requirement already satisfied (use --upgrade to upgrade): pyelliptic in /Users/yanik/code/crypto_tickets/env2/lib/python2.7/site-packages (from devp2p)
Requirement already satisfied (use --upgrade to upgrade): rlp==0.4.4 in /Users/yanik/code/crypto_tickets/env2/lib/python2.7/site-packages (from devp2p)
Collecting secp256k1 (from devp2p)
  Using cached secp256k1-0.12.1.tar.gz
Collecting tinyrpc (from devp2p)
Requirement already satisfied (use --upgrade to upgrade): bitcoin in /Users/yanik/code/crypto_tickets/env2/lib/python2.7/site-packages (from devp2p)
Collecting tox (from devp2p)
  Using cached tox-2.3.1-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): greenlet>=0.4.9 in /Users/yanik/code/crypto_tickets/env2/lib/python2.7/site-packages (from gevent>=1.1.0->devp2p)
Requirement already satisfied (use --upgrade to upgrade): cffi>=1.3.0 in /Users/yanik/code/crypto_tickets/env2/lib/python2.7/site-packages (from secp256k1->devp2p)
Collecting virtualenv>=1.11.2 (from tox->devp2p)
  Using cached virtualenv-15.0.1-py2.py3-none-any.whl
Collecting py>=1.4.17 (from tox->devp2p)
  Using cached py-1.4.31-py2.py3-none-any.whl
Collecting pluggy<0.4.0,>=0.3.0 (from tox->devp2p)
  Using cached pluggy-0.3.1-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): pycparser in /Users/yanik/code/crypto_tickets/env2/lib/python2.7/site-packages (from cffi>=1.3.0->secp256k1->devp2p)
Building wheels for collected packages: secp256k1
  Running setup.py bdist_wheel for secp256k1 ... error
  Complete output from command /Users/yanik/code/crypto_tickets/env2/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/bk/f_fg31cj7f3gcr30tnkndplh0000gn/T/pip-build-lvpfsX/secp256k1/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/bk/f_fg31cj7f3gcr30tnkndplh0000gn/T/tmpnHu8_Zpip-wheel- --python-tag cp27:
  0.29.1
  Using bundled libsecp256k1
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.11-intel-2.7
  creating build/lib.macosx-10.11-intel-2.7/secp256k1
  copying secp256k1/__init__.py -> build/lib.macosx-10.11-intel-2.7/secp256k1
  running build_clib
  configure.ac:20: installing 'build-aux/compile'
  configure.ac:5: installing 'build-aux/config.guess'
  configure.ac:5: installing 'build-aux/config.sub'
  configure.ac:9: installing 'build-aux/install-sh'
  configure.ac:9: installing 'build-aux/missing'
  Makefile.am:3: error: Libtool library used but 'LIBTOOL' is undefined
  Makefile.am:3:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
  Makefile.am:3:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
  Makefile.am:3:   If 'LT_INIT' is in 'configure.ac', make sure
  Makefile.am:3:   its definition is in aclocal's search path.
  Makefile.am: installing 'build-aux/depcomp'
  parallel-tests: installing 'build-aux/test-driver'
  autoreconf: automake failed with exit status: 1
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/bk/f_fg31cj7f3gcr30tnkndplh0000gn/T/pip-build-lvpfsX/secp256k1/setup.py", line 274, in <module>
      "Topic :: Security :: Cryptography"
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
      dist.run_commands()
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
      self.run_command(cmd)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
    File "/Users/yanik/code/crypto_tickets/env2/lib/python2.7/site-packages/wheel/bdist_wheel.py", line 175, in run
      self.run_command('build')
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
      self.distribution.run_command(command)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run
      self.run_command(cmd_name)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
      self.distribution.run_command(command)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
    File "/private/var/folders/bk/f_fg31cj7f3gcr30tnkndplh0000gn/T/pip-build-lvpfsX/secp256k1/setup.py", line 151, in run
      cwd=absolute("libsecp256k1"),
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/private/var/folders/bk/f_fg31cj7f3gcr30tnkndplh0000gn/T/pip-build-lvpfsX/secp256k1/libsecp256k1/autogen.sh']' returned non-zero exit status 1

  ----------------------------------------
  Failed building wheel for secp256k1
  Running setup.py clean for secp256k1
Failed to build secp256k1
Installing collected packages: secp256k1, tinyrpc, virtualenv, py, pluggy, tox, devp2p
  Running setup.py install for secp256k1 ... error
    Complete output from command /Users/yanik/code/crypto_tickets/env2/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/bk/f_fg31cj7f3gcr30tnkndplh0000gn/T/pip-build-lvpfsX/secp256k1/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/bk/f_fg31cj7f3gcr30tnkndplh0000gn/T/pip-1E_fEw-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/yanik/code/crypto_tickets/env2/include/site/python2.7/secp256k1:
    0.29.1
    Using bundled libsecp256k1
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.11-intel-2.7
    creating build/lib.macosx-10.11-intel-2.7/secp256k1
    copying secp256k1/__init__.py -> build/lib.macosx-10.11-intel-2.7/secp256k1
    running build_clib
    configure: WARNING: unrecognized options: --disable-shared, --enable-static, --with-pic
    checking build system type... x86_64-apple-darwin15.4.0
    checking host system type... x86_64-apple-darwin15.4.0
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /private/var/folders/bk/f_fg31cj7f3gcr30tnkndplh0000gn/T/pip-build-lvpfsX/secp256k1/libsecp256k1/build-aux/install-sh -c -d
    checking for gawk... no
    checking for mawk... no
    checking for nawk... no
    checking for awk... awk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    /private/var/folders/bk/f_fg31cj7f3gcr30tnkndplh0000gn/T/pip-build-lvpfsX/secp256k1/libsecp256k1/configure: line 2899: LT_INIT: command not found
    checking whether make supports nested variables... (cached) yes
    checking for pkg-config... /usr/local/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    checking for ar... /usr/bin/ar
    checking for ranlib... /usr/bin/ranlib
    checking for strip... /usr/bin/strip
    checking for style of include used by make... GNU
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking whether gcc understands -c and -o together... yes
    checking dependency style of gcc... none
    checking how to run the C preprocessor... gcc -E
    checking for gcc... gcc
    checking whether we are using the GNU C compiler... (cached) yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... (cached) none needed
    checking whether gcc understands -c and -o together... (cached) yes
    checking dependency style of gcc... (cached) none
    checking how to run the C preprocessor... gcc -E
    checking for gcc option to accept ISO C89... (cached) none needed
    checking for brew... /usr/local/bin/brew
    checking if gcc supports -std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wno-unused-function -Wno-long-long -Wno-overlength-strings... yes
    checking if gcc supports -fvisibility=hidden... yes
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for __int128... yes
    checking for __builtin_expect... yes
    checking for x86_64 assembly availability... no
    checking gmp.h usability... yes
    checking gmp.h presence... yes
    checking for gmp.h... yes
    checking for __gmpz_init in -lgmp... yes
    checking for CRYPTO... yes
    checking for main in -lcrypto... yes
    checking for EC functions in libcrypto... no
    checking whether byte ordering is bigendian... no
    configure: Using assembly optimizations: no
    configure: Using field implementation: 64bit
    configure: Using bignum implementation: gmp
    configure: Using scalar implementation: 64bit
    configure: Using endomorphism optimizations: no
    configure: Building ECDSA pubkey recovery module: yes
    checking that generated files are newer than configure... done
    configure: creating ./config.status
    config.status: error: cannot find input file: `Makefile.in'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/bk/f_fg31cj7f3gcr30tnkndplh0000gn/T/pip-build-lvpfsX/secp256k1/setup.py", line 274, in <module>
        "Topic :: Security :: Cryptography"
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/Users/yanik/code/crypto_tickets/env2/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 573, in run
        self.run_command('build')
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run
        self.run_command(cmd_name)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
        self.distribution.run_command(command)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/private/var/folders/bk/f_fg31cj7f3gcr30tnkndplh0000gn/T/pip-build-lvpfsX/secp256k1/setup.py", line 194, in run
        cwd=build_temp,
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/private/var/folders/bk/f_fg31cj7f3gcr30tnkndplh0000gn/T/pip-build-lvpfsX/secp256k1/libsecp256k1/configure', '--disable-shared', '--enable-static', '--disable-dependency-tracking', '--with-pic', '--enable-module-recovery', '--prefix', '/private/var/folders/bk/f_fg31cj7f3gcr30tnkndplh0000gn/T/pip-build-lvpfsX/secp256k1/build/temp.macosx-10.11-intel-2.7']' returned non-zero exit status 1

    ----------------------------------------
Command "/Users/yanik/code/crypto_tickets/env2/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/bk/f_fg31cj7f3gcr30tnkndplh0000gn/T/pip-build-lvpfsX/secp256k1/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/bk/f_fg31cj7f3gcr30tnkndplh0000gn/T/pip-1E_fEw-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/yanik/code/crypto_tickets/env2/include/site/python2.7/secp256k1" failed with error code 1 in /private/var/folders/bk/f_fg31cj7f3gcr30tnkndplh0000gn/T/pip-build-lvpfsX/secp256k1/

Was also trying to install secp256k1-py directly from master. Have a bit different extensions:

0.29.1
Using bundled libsecp256k1
running install
running bdist_egg
running egg_info
downloading libsecp256k1 source code
creating secp256k1.egg-info
writing requirements to secp256k1.egg-info/requires.txt
writing secp256k1.egg-info/PKG-INFO
writing top-level names to secp256k1.egg-info/top_level.txt
writing dependency_links to secp256k1.egg-info/dependency_links.txt
writing manifest file 'secp256k1.egg-info/SOURCES.txt'
reading manifest file 'secp256k1.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'secp256k1.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.11-intel/egg
running build_clib
configure.ac:20: installing 'build-aux/compile'
configure.ac:5: installing 'build-aux/config.guess'
configure.ac:5: installing 'build-aux/config.sub'
configure.ac:9: installing 'build-aux/install-sh'
configure.ac:9: installing 'build-aux/missing'
Makefile.am:3: error: Libtool library used but 'LIBTOOL' is undefined
Makefile.am:3:   The usual way to define 'LIBTOOL' is to add 'LT_INIT'
Makefile.am:3:   to 'configure.ac' and run 'aclocal' and 'autoconf' again.
Makefile.am:3:   If 'LT_INIT' is in 'configure.ac', make sure
Makefile.am:3:   its definition is in aclocal's search path.
Makefile.am: installing 'build-aux/depcomp'
parallel-tests: installing 'build-aux/test-driver'
autoreconf: automake failed with exit status: 1
Traceback (most recent call last):
  File "setup.py", line 274, in <module>
    "Topic :: Security :: Cryptography"
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/yanik/code/crypto_tickets/env2/lib/python2.7/site-packages/setuptools/command/install.py", line 67, in run
    self.do_egg_install()
  File "/Users/yanik/code/crypto_tickets/env2/lib/python2.7/site-packages/setuptools/command/install.py", line 109, in do_egg_install
    self.run_command('bdist_egg')
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/yanik/code/crypto_tickets/env2/lib/python2.7/site-packages/setuptools/command/bdist_egg.py", line 160, in run
    self.run_command('build_clib')
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 151, in run
    cwd=absolute("libsecp256k1"),
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/yanik/code/crypto_tickets/pyethapp/secp256k1-py/libsecp256k1/autogen.sh']' returned non-zero exit status 1
5

You're missing libtool. You can install it from homebrew with brew install libtool

Furthermore we advice that you always run pyethapp within a virtualenv.

  • thx, this was originally suggested by @ulope – yanik Apr 12 '16 at 12:48
  • Also, apt install libtool works for those on Debian/Ubuntu-flavored systems. – carver Dec 29 '17 at 17:17
1

I'd like to mention also my experience on Ubuntu with this error since I had to do more to make it work.

Additionally, I needed to install python-dev and and libssl-dev libraries.

p.s. Just in case the whole sh script to install pyethapp on a 64-bit Ubuntu 14.04 machine that worked for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.