ludbb / secp256k1-py

Python FFI bindings for secp256k1 :dizzy:
MIT License
107 stars 53 forks source link

can't install secp256k1 #33

Open bitProfessor opened 5 years ago

bitProfessor commented 5 years ago

pip3 install secp256k1 Collecting secp256k1 Using cached https://files.pythonhosted.org/packages/52/62/d7bf3829e126e517e253d2e22a63511c54bbaac34d7ddea316cde040fc49/secp256k1-0.13.2.tar.gz Requirement already satisfied: cffi>=1.3.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from secp256k1) (1.11.4) Requirement already satisfied: pycparser in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from cffi>=1.3.0->secp256k1) (2.18) Installing collected packages: secp256k1 Running setup.py install for secp256k1 ... error Complete output from command /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c "import setuptools, tokenize;file='/private/var/folders/gp/s1z4588n7rl0v6_zkr6st3p80000gn/T/pip-install-jopw882v/secp256k1/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /private/var/folders/gp/s1z4588n7rl0v6_zkr6st3p80000gn/T/pip-record-_rtg1xtz/install-record.txt --single-version-externally-managed --compile: 0.29.2 Using bundled libsecp256k1 running install running build running build_py creating build creating build/lib.macosx-10.9-x86_64-3.7 creating build/lib.macosx-10.9-x86_64-3.7/secp256k1 copying secp256k1/init.py -> build/lib.macosx-10.9-x86_64-3.7/secp256k1 copying secp256k1/main.py -> build/lib.macosx-10.9-x86_64-3.7/secp256k1 running build_clib Can't exec "aclocal": No such file or directory at /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/FileUtils.pm line 326. autoreconf: failed to run aclocal: No such file or directory Traceback (most recent call last): File "", line 1, in File "/private/var/folders/gp/s1z4588n7rl0v6_zkr6st3p80000gn/T/pip-install-jopw882v/secp256k1/setup.py", line 295, in "Topic :: Security :: Cryptography" File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/init.py", line 145, in setup return distutils.core.setup(**attrs) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run return orig.install.run(self) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/install.py", line 545, in run self.run_command('build') File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/private/var/folders/gp/s1z4588n7rl0v6_zkr6st3p80000gn/T/pip-install-jopw882v/secp256k1/setup.py", line 165, in run cwd=absolute("libsecp256k1"), File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 347, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/private/var/folders/gp/s1z4588n7rl0v6_zkr6st3p80000gn/T/pip-install-jopw882v/secp256k1/libsecp256k1/autogen.sh']' returned non-zero exit status 1.

----------------------------------------

Command "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c "import setuptools, tokenize;file='/private/var/folders/gp/s1z4588n7rl0v6_zkr6st3p80000gn/T/pip-install-jopw882v/secp256k1/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /private/var/folders/gp/s1z4588n7rl0v6_zkr6st3p80000gn/T/pip-record-_rtg1xtz/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/gp/s1z4588n7rl0v6_zkr6st3p80000gn/T/pip-install-jopw882v/secp256k1/

bitProfessor commented 5 years ago

osx,python3.7

Skyge commented 5 years ago

On OS X the necessary homebrew packages are:

@bitProfessor Please give a feedback.

lancekrogers commented 5 years ago

I'm having the same problem on Ubuntu 18.04 with python 3.7.3

 Failed building wheel for secp256k1
  Running setup.py clean for secp256k1
Failed to build secp256k1
Installing collected packages: six, python-dateutil, jmespath, urllib3, docutils, botocore, s3transfer, boto3, redis, elasticsearch, pytz, tzlocal, apscheduler, jsonpath, MarkupSafe, Jinja2, itsdangerous, Werkzeug, click, Flask, certifi, chardet, idna, requests, attrs, pyrsistent, jsonschema, pycparser, cffi, secp256k1, pycryptodome, eth-hash, eth-typing, parsimonious, toolz, cytoolz, eth-utils, eth-abi, attrdict, hexbytes, rlp, eth-rlp, eth-keys, eth-keyfile, eth-account, websockets, lru-dict, web3, cachetools, pyasn1, rsa, pyasn1-modules, google-auth, oauthlib, requests-oauthlib, websocket-client, pyyaml, kubernetes, docker, greenlet, gevent, gunicorn, multidict, yarl, async-timeout, aiohttp, cchardet, hiredis, aioredis, base58, asn1crypto, coincurve, bit
  Running setup.py install for secp256k1 ... error
    Complete output from command /home/Project/.direnv/python-venv-3.7.3/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-e52l0p3s/secp256k1/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-cck20kyl-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/lance/Project/.direnv/python-venv-3.7.3/include/site/python3.7/secp256k1 --user --prefix=:
    0.29.1
    Installed libsecp256k1 is unusable falling back to bundled version.
    Using bundled libsecp256k1
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    creating build/lib.linux-x86_64-3.7/secp256k1
    copying secp256k1/__main__.py -> build/lib.linux-x86_64-3.7/secp256k1
    copying secp256k1/__init__.py -> build/lib.linux-x86_64-3.7/secp256k1
    running build_ext
    generating cffi module 'build/temp.linux-x86_64-3.7/_libsecp256k1.c'
    creating build/temp.linux-x86_64-3.7
    building '_libsecp256k1' extension
    creating build/temp.linux-x86_64-3.7/build
    creating build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/lance/Project/.direnv/python-venv-3.7.3/include -I/usr/include/python3.7m -c build/temp.linux-x86_64-3.7/_libsecp256k1.c -o build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7/_libsecp256k1.o
    build/temp.linux-x86_64-3.7/_libsecp256k1.c:492:10: fatal error: secp256k1.h: No such file or directory
     #include <secp256k1.h>
              ^~~~~~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/home/lance/Project/.direnv/python-venv-3.7.3/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-e52l0p3s/secp256k1/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-cck20kyl-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/lance/Project/.direnv/python-venv-3.7.3/include/site/python3.7/secp256k1 --user --prefix=" failed with error code 1 in /tmp/pip-build-e52l0p3s/secp256k1/

As a work around I installed libsecp256k1-dev

sudo apt-get install libsecp256k1-dev

fbertoia commented 3 years ago

Hello,

I open this ticket since I'm having the same issue. I'm on macOS Catalina 10.15.7, Python : 3.8.6

I installed automake pkg-config libtool libffi gmp last version.

When I try to install secp256k1, I get the following message :

➜  site-packages brew install automake pkg-config libtool libffi gmp
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
Updated 2 formulae.

Warning: automake 1.16.3 is already installed and up-to-date
To reinstall 1.16.3, run `brew reinstall automake`
Warning: pkg-config 0.29.2_3 is already installed and up-to-date
To reinstall 0.29.2_3, run `brew reinstall pkg-config`
Warning: libtool 2.4.6_2 is already installed and up-to-date
To reinstall 2.4.6_2, run `brew reinstall libtool`
Warning: libffi 3.3 is already installed and up-to-date
To reinstall 3.3, run `brew reinstall libffi`
Warning: gmp 6.2.1 is already installed and up-to-date
To reinstall 6.2.1, run `brew reinstall gmp`
➜  site-packages pip3 install secp256k1
Collecting secp256k1
  Using cached secp256k1-0.13.2.tar.gz (156 kB)
Requirement already satisfied: cffi>=1.3.0 in /Users/Frederic/Library/Python/3.8/lib/python/site-packages (from secp256k1) (1.14.4)
Requirement already satisfied: pycparser in /Users/Frederic/Library/Python/3.8/lib/python/site-packages (from cffi>=1.3.0->secp256k1) (2.20)
Building wheels for collected packages: secp256k1
  Building wheel for secp256k1 (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/setup.py'"'"'; __file__='"'"'/private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-wheel-0myochuh
       cwd: /private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/
  Complete output (203 lines):
  0.29.2
  Using bundled libsecp256k1
  running bdist_wheel
  The [wheel] section is deprecated. Use [bdist_wheel] instead.
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.9-x86_64-3.8
  creating build/lib.macosx-10.9-x86_64-3.8/secp256k1
  copying secp256k1/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/secp256k1
  copying secp256k1/__main__.py -> build/lib.macosx-10.9-x86_64-3.8/secp256k1
  running build_clib
  glibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
  glibtoolize: copying file 'build-aux/ltmain.sh'
  glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'build-aux/m4'.
  glibtoolize: copying file 'build-aux/m4/libtool.m4'
  glibtoolize: copying file 'build-aux/m4/ltoptions.m4'
  glibtoolize: copying file 'build-aux/m4/ltsugar.m4'
  glibtoolize: copying file 'build-aux/m4/ltversion.m4'
  glibtoolize: copying file 'build-aux/m4/lt~obsolete.m4'
  configure.ac:10: 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: installing 'build-aux/depcomp'
  parallel-tests: installing 'build-aux/test-driver'
  checking build system type... x86_64-apple-darwin19.6.0
  checking host system type... x86_64-apple-darwin19.6.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/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/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
  checking how to print strings... printf
  checking whether make supports the include directive... yes (GNU style)
  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 for a sed that does not truncate output... /usr/bin/sed
  checking for grep that handles long lines and -e... /usr/bin/grep
  checking for egrep... /usr/bin/grep -E
  checking for fgrep... /usr/bin/grep -F
  checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
  checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
  checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
  checking the name lister (/usr/bin/nm -B) interface... BSD nm
  checking whether ln -s works... yes
  checking the maximum length of command line arguments... 196608
  checking how to convert x86_64-apple-darwin19.6.0 file names to x86_64-apple-darwin19.6.0 format... func_convert_file_noop
  checking how to convert x86_64-apple-darwin19.6.0 file names to toolchain format... func_convert_file_noop
  checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
  checking for objdump... objdump
  checking how to recognize dependent libraries... pass_all
  checking for dlltool... no
  checking how to associate runtime and link libraries... printf %s\n
  checking for ar... ar
  checking for archiver @FILE support... no
  checking for strip... strip
  checking for ranlib... ranlib
  checking command to parse /usr/bin/nm -B output from gcc object... ok
  checking for sysroot... no
  checking for a working dd... /bin/dd
  checking how to truncate binary pipes... /bin/dd bs=4096 count=1
  checking for mt... no
  checking if : is a manifest tool... no
  checking for dsymutil... dsymutil
  checking for nmedit... nmedit
  checking for lipo... lipo
  checking for otool... otool
  checking for otool64... no
  checking for -single_module linker flag... yes
  checking for -exported_symbols_list linker flag... yes
  checking for -force_load linker flag... yes
  checking how to run the C preprocessor... gcc -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 dlfcn.h... yes
  checking for objdir... .libs
  checking if gcc supports -fno-rtti -fno-exceptions... yes
  checking for gcc option to produce PIC... -fno-common -DPIC
  checking if gcc PIC flag -fno-common -DPIC works... yes
  checking if gcc static flag -static works... no
  checking if gcc supports -c -o file.o... yes
  checking if gcc supports -c -o file.o... (cached) yes
  checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
  checking dynamic linker characteristics... darwin19.6.0 dyld
  checking how to hardcode library paths into programs... immediate
  checking whether stripping libraries is possible... yes
  checking if libtool supports shared libraries... yes
  checking whether to build shared libraries... no
  checking whether to build static libraries... yes
  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 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 dependency style of gcc... none
  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 __int128... yes
  checking for __builtin_expect... yes
  checking native compiler: gcc... ok
  checking for x86_64 assembly availability... yes
  checking for libcrypto... yes
  checking for main in -lcrypto... yes
  checking for EC functions in libcrypto... no
  checking for javac... /usr/bin/javac
  checking symlink for /usr/bin/javac... /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javac
  checking jni headers... none
  configure: WARNING: jni headers/dependencies not found. jni support disabled
  checking whether byte ordering is bigendian... no
  configure: Using static precomputation: yes
  configure: Using assembly optimizations: x86_64
  configure: Using field implementation: 64bit
  configure: Using bignum implementation: no
  configure: Using scalar implementation: 64bit
  configure: Using endomorphism optimizations: no
  configure: Building ECDH module: no
  configure: Building Schnorr signatures module: no
  configure: Building ECDSA pubkey recovery module: yes
  configure: Using jni: no
  checking that generated files are newer than configure... done
  configure: creating ./config.status
  config.status: creating Makefile
  config.status: creating libsecp256k1.pc
  config.status: creating src/libsecp256k1-config.h
  config.status: executing depfiles commands
  config.status: executing libtool commands
    CC       src/tests-tests.o
  In file included from /private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/libsecp256k1/src/tests.c:16:
  In file included from /private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/libsecp256k1/src/secp256k1.c:14:
  /private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/libsecp256k1/src/ecmult_impl.h:186:9: error: implicitly declaring library function 'memcpy' with type 'void *(void *, const void *, unsigned long)' [-Werror,-Wimplicit-function-declaration]
          memcpy(dst->pre_g, src->pre_g, size);
          ^
  /private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/libsecp256k1/src/ecmult_impl.h:186:9: note: include the header <string.h> or explicitly provide a declaration for 'memcpy'
  /private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/libsecp256k1/src/ecmult_impl.h:230:5: error: implicitly declaring library function 'memset' with type 'void *(void *, int, unsigned long)' [-Werror,-Wimplicit-function-declaration]
      memset(wnaf, 0, len * sizeof(wnaf[0]));
      ^
  /private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/libsecp256k1/src/ecmult_impl.h:230:5: note: include the header <string.h> or explicitly provide a declaration for 'memset'
  2 errors generated.
  make: *** [src/tests-tests.o] Error 1
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/setup.py", line 256, in <module>
      setup(
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 165, in setup
      return distutils.core.setup(**attrs)
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/setup.py", line 103, in run
      _bdist_wheel.run(self)
    File "/Users/Frederic/Library/Python/3.8/lib/python/site-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/setup.py", line 217, in run
      subprocess.check_call(["make"], cwd=build_temp)
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 364, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['make']' returned non-zero exit status 2.
  ----------------------------------------
  ERROR: Failed building wheel for secp256k1
  Running setup.py clean for secp256k1
Failed to build secp256k1
Installing collected packages: secp256k1
    Running setup.py install for secp256k1 ... error
    ERROR: Command errored out with exit status 1:
     command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/setup.py'"'"'; __file__='"'"'/private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-record-qwhiebd4/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/secp256k1
         cwd: /private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/
    Complete output (187 lines):
    0.29.2
    Using bundled libsecp256k1
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-x86_64-3.8
    creating build/lib.macosx-10.9-x86_64-3.8/secp256k1
    copying secp256k1/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/secp256k1
    copying secp256k1/__main__.py -> build/lib.macosx-10.9-x86_64-3.8/secp256k1
    running build_clib
    checking build system type... x86_64-apple-darwin19.6.0
    checking host system type... x86_64-apple-darwin19.6.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/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/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
    checking how to print strings... printf
    checking whether make supports the include directive... yes (GNU style)
    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 for a sed that does not truncate output... /usr/bin/sed
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for fgrep... /usr/bin/grep -F
    checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
    checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
    checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
    checking the name lister (/usr/bin/nm -B) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 196608
    checking how to convert x86_64-apple-darwin19.6.0 file names to x86_64-apple-darwin19.6.0 format... func_convert_file_noop
    checking how to convert x86_64-apple-darwin19.6.0 file names to toolchain format... func_convert_file_noop
    checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
    checking for objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for dlltool... no
    checking how to associate runtime and link libraries... printf %s\n
    checking for ar... ar
    checking for archiver @FILE support... no
    checking for strip... strip
    checking for ranlib... ranlib
    checking command to parse /usr/bin/nm -B output from gcc object... ok
    checking for sysroot... no
    checking for a working dd... /bin/dd
    checking how to truncate binary pipes... /bin/dd bs=4096 count=1
    checking for mt... no
    checking if : is a manifest tool... no
    checking for dsymutil... dsymutil
    checking for nmedit... nmedit
    checking for lipo... lipo
    checking for otool... otool
    checking for otool64... no
    checking for -single_module linker flag... yes
    checking for -exported_symbols_list linker flag... yes
    checking for -force_load linker flag... yes
    checking how to run the C preprocessor... gcc -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 dlfcn.h... yes
    checking for objdir... .libs
    checking if gcc supports -fno-rtti -fno-exceptions... yes
    checking for gcc option to produce PIC... -fno-common -DPIC
    checking if gcc PIC flag -fno-common -DPIC works... yes
    checking if gcc static flag -static works... no
    checking if gcc supports -c -o file.o... yes
    checking if gcc supports -c -o file.o... (cached) yes
    checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
    checking dynamic linker characteristics... darwin19.6.0 dyld
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... no
    checking whether to build static libraries... yes
    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 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 dependency style of gcc... none
    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 __int128... yes
    checking for __builtin_expect... yes
    checking native compiler: gcc... ok
    checking for x86_64 assembly availability... yes
    checking for libcrypto... yes
    checking for main in -lcrypto... yes
    checking for EC functions in libcrypto... no
    checking for javac... /usr/bin/javac
    checking symlink for /usr/bin/javac... /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javac
    checking jni headers... none
    configure: WARNING: jni headers/dependencies not found. jni support disabled
    checking whether byte ordering is bigendian... no
    configure: Using static precomputation: yes
    configure: Using assembly optimizations: x86_64
    configure: Using field implementation: 64bit
    configure: Using bignum implementation: no
    configure: Using scalar implementation: 64bit
    configure: Using endomorphism optimizations: no
    configure: Building ECDH module: no
    configure: Building Schnorr signatures module: no
    configure: Building ECDSA pubkey recovery module: yes
    configure: Using jni: no
    checking that generated files are newer than configure... done
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating libsecp256k1.pc
    config.status: creating src/libsecp256k1-config.h
    config.status: executing depfiles commands
    config.status: executing libtool commands
      CC       src/tests-tests.o
    In file included from /private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/libsecp256k1/src/tests.c:16:
    In file included from /private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/libsecp256k1/src/secp256k1.c:14:
    /private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/libsecp256k1/src/ecmult_impl.h:186:9: error: implicitly declaring library function 'memcpy' with type 'void *(void *, const void *, unsigned long)' [-Werror,-Wimplicit-function-declaration]
            memcpy(dst->pre_g, src->pre_g, size);
            ^
    /private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/libsecp256k1/src/ecmult_impl.h:186:9: note: include the header <string.h> or explicitly provide a declaration for 'memcpy'
    /private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/libsecp256k1/src/ecmult_impl.h:230:5: error: implicitly declaring library function 'memset' with type 'void *(void *, int, unsigned long)' [-Werror,-Wimplicit-function-declaration]
        memset(wnaf, 0, len * sizeof(wnaf[0]));
        ^
    /private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/libsecp256k1/src/ecmult_impl.h:230:5: note: include the header <string.h> or explicitly provide a declaration for 'memset'
    2 errors generated.
    make: *** [src/tests-tests.o] Error 1
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/setup.py", line 256, in <module>
        setup(
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 165, in setup
        return distutils.core.setup(**attrs)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/install.py", line 545, in run
        self.run_command('build')
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/setup.py", line 217, in run
        subprocess.check_call(["make"], cwd=build_temp)
      File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 364, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['make']' returned non-zero exit status 2.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/setup.py'"'"'; __file__='"'"'/private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-install-al1zv268/secp256k1_08852f64067e4efeb1fb3437d0884b0f/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/n4/2qwvjk_d437b5tqtqyl84qnh0000gp/T/pip-record-qwhiebd4/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/secp256k1 Check the logs for full command output.

Do you know the reason ?

carlolm commented 3 years ago

Following thread. Similar issue @fbertoia , did you make any progress figuring it out?

> pip install secp256k1         

Collecting secp256k1
  Using cached secp256k1-0.13.2.tar.gz (156 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/local/anaconda3/envs/parrot/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/7b/xmdfdn0s5nv7q43mc7_rz5l00000gn/T/pip-install-_27536mj/secp256k1/setup.py'"'"'; __file__='"'"'/private/var/folders/7b/xmdfdn0s5nv7q43mc7_rz5l00000gn/T/pip-install-_27536mj/secp256k1/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/7b/xmdfdn0s5nv7q43mc7_rz5l00000gn/T/pip-install-_27536mj/secp256k1/pip-egg-info
         cwd: /private/var/folders/7b/xmdfdn0s5nv7q43mc7_rz5l00000gn/T/pip-install-_27536mj/secp256k1/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/7b/xmdfdn0s5nv7q43mc7_rz5l00000gn/T/pip-install-_27536mj/secp256k1/setup.py", line 41, in <module>
        if [int(i) for i in setuptools_version.split('.')] < [3, 3]:
      File "/private/var/folders/7b/xmdfdn0s5nv7q43mc7_rz5l00000gn/T/pip-install-_27536mj/secp256k1/setup.py", line 41, in <listcomp>
        if [int(i) for i in setuptools_version.split('.')] < [3, 3]:
    ValueError: invalid literal for int() with base 10: 'post20200330'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
hoangdv2429 commented 3 years ago

Similar issue @carlolm, did you make any progress figuring it out?

> pip install secp256k1         

Collecting secp256k1
  Using cached secp256k1-0.13.2.tar.gz (156 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/local/anaconda3/envs/parrot/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/7b/xmdfdn0s5nv7q43mc7_rz5l00000gn/T/pip-install-_27536mj/secp256k1/setup.py'"'"'; __file__='"'"'/private/var/folders/7b/xmdfdn0s5nv7q43mc7_rz5l00000gn/T/pip-install-_27536mj/secp256k1/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/7b/xmdfdn0s5nv7q43mc7_rz5l00000gn/T/pip-install-_27536mj/secp256k1/pip-egg-info
         cwd: /private/var/folders/7b/xmdfdn0s5nv7q43mc7_rz5l00000gn/T/pip-install-_27536mj/secp256k1/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/7b/xmdfdn0s5nv7q43mc7_rz5l00000gn/T/pip-install-_27536mj/secp256k1/setup.py", line 41, in <module>
        if [int(i) for i in setuptools_version.split('.')] < [3, 3]:
      File "/private/var/folders/7b/xmdfdn0s5nv7q43mc7_rz5l00000gn/T/pip-install-_27536mj/secp256k1/setup.py", line 41, in <listcomp>
        if [int(i) for i in setuptools_version.split('.')] < [3, 3]:
    ValueError: invalid literal for int() with base 10: 'post20200330'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
astro-martian commented 3 years ago

Having the same issue on MacOS M1 - have installed the needed homebrew packages

Did anyone find any solution to this?

hoangdv2429 commented 3 years ago

Having the same issue on MacOS M1 - have installed the needed homebrew packages

Did anyone find any solution to this?

I installed Python 15.2 with pyenv and it worked find now.

zacker0515 commented 3 years ago

On OS X the necessary homebrew packages are:

  • automake
  • pkg-config
  • libtool
  • libffi
  • gmp

@bitProfessor Please give a feedback.

it not work for me (m1 macos python3.9) here are the info ,is there any solutions?

Collecting secp256k1==0.13.2 Using cached secp256k1-0.13.2.tar.gz (156 kB) ERROR: Command errored out with exit status 1: command: /Users/vino/Desktop/projects/wall_manager/coinex_wallet_manager-master/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/sf/r19j9gr52c95p3md2lb1663w0000gn/T/pip-install-nfs4rbwg/secp256k1_f7a7b869849e4db2be6cf09b6f297b05/setup.py'"'"'; file='"'"'/private/var/folders/sf/r19j9gr52c95p3md2lb1663w0000gn/T/pip-install-nfs4rbwg/secp256k1_f7a7b869849e4db2be6cf09b6f297b05/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/sf/r19j9gr52c95p3md2lb1663w0000gn/T/pip-pip-egg-info-wzi4ngos cwd: /private/var/folders/sf/r19j9gr52c95p3md2lb1663w0000gn/T/pip-install-nfs4rbwg/secp256k1_f7a7b869849e4db2be6cf09b6f297b05/ Complete output (46 lines): 0.29.2 WARNING: The wheel package is not available. ERROR: Command errored out with exit status 1: command: /Users/vino/Desktop/projects/wall_manager/coinex_wallet_manager-master/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/sf/r19j9gr52c95p3md2lb1663w0000gn/T/pip-wheel-uevimfwc/pytest-runner_12dd59f3c64545589fed4993e0f4ae95/setup.py'"'"'; file='"'"'/private/var/folders/sf/r19j9gr52c95p3md2lb1663w0000gn/T/pip-wheel-uevimfwc/pytest-runner_12dd59f3c64545589fed4993e0f4ae95/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/sf/r19j9gr52c95p3md2lb1663w0000gn/T/pip-wheel-fbrsw2ky cwd: /private/var/folders/sf/r19j9gr52c95p3md2lb1663w0000gn/T/pip-wheel-uevimfwc/pytest-runner_12dd59f3c64545589fed4993e0f4ae95/ Complete output (7 lines): WARNING: The wheel package is not available. usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help

  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for pytest-runner
ERROR: Failed to build one or more wheels
Traceback (most recent call last):
  File "/Users/vino/Desktop/projects/wall_manager/coinex_wallet_manager-master/venv/lib/python3.9/site-packages/setuptools/installer.py", line 75, in fetch_build_egg
    subprocess.check_call(cmd)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/vino/Desktop/projects/wall_manager/coinex_wallet_manager-master/venv/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/sf/r19j9gr52c95p3md2lb1663w0000gn/T/tmp2xmm39by', '--quiet', 'pytest-runner==2.6.2']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/var/folders/sf/r19j9gr52c95p3md2lb1663w0000gn/T/pip-install-nfs4rbwg/secp256k1_f7a7b869849e4db2be6cf09b6f297b05/setup.py", line 256, in <module>
    setup(
  File "/Users/vino/Desktop/projects/wall_manager/coinex_wallet_manager-master/venv/lib/python3.9/site-packages/setuptools/__init__.py", line 152, in setup
    _install_setup_requires(attrs)
  File "/Users/vino/Desktop/projects/wall_manager/coinex_wallet_manager-master/venv/lib/python3.9/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/Users/vino/Desktop/projects/wall_manager/coinex_wallet_manager-master/venv/lib/python3.9/site-packages/setuptools/dist.py", line 748, in fetch_build_eggs
    resolved_dists = pkg_resources.working_set.resolve(
  File "/Users/vino/Desktop/projects/wall_manager/coinex_wallet_manager-master/venv/lib/python3.9/site-packages/pkg_resources/__init__.py", line 766, in resolve
    dist = best[req.key] = env.best_match(
  File "/Users/vino/Desktop/projects/wall_manager/coinex_wallet_manager-master/venv/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1051, in best_match
    return self.obtain(req, installer)
  File "/Users/vino/Desktop/projects/wall_manager/coinex_wallet_manager-master/venv/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1063, in obtain
    return installer(requirement)
  File "/Users/vino/Desktop/projects/wall_manager/coinex_wallet_manager-master/venv/lib/python3.9/site-packages/setuptools/dist.py", line 807, in fetch_build_egg
    return fetch_build_egg(self, req)
  File "/Users/vino/Desktop/projects/wall_manager/coinex_wallet_manager-master/venv/lib/python3.9/site-packages/setuptools/installer.py", line 77, in fetch_build_egg
    raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['/Users/vino/Desktop/projects/wall_manager/coinex_wallet_manager-master/venv/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/sf/r19j9gr52c95p3md2lb1663w0000gn/T/tmp2xmm39by', '--quiet', 'pytest-runner==2.6.2']' returned non-zero exit status 1.
----------------------------------------

WARNING: Discarding https://files.pythonhosted.org/packages/52/62/d7bf3829e126e517e253d2e22a63511c54bbaac34d7ddea316cde040fc49/secp256k1-0.13.2.tar.gz#sha256=a3b43e02d321c09eafa769a6fc2c156f555cab3a7db62175ef2fd21e16cdf20c (from https://pypi.org/simple/secp256k1/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Could not find a version that satisfies the requirement secp256k1==0.13.2 (from versions: 0.1.1, 0.1.2, 0.1.5, 0.2.0, 0.3.0, 0.3.1, 0.5.1, 0.7.0, 0.7.2, 0.8.1, 0.8.2, 0.8.5, 0.9.0, 0.10.0, 0.11.0, 0.11.1, 0.12.0, 0.12.1, 0.13.0, 0.13.1, 0.13.2) ERROR: No matching distribution found for secp256k1==0.13.2

zacker0515 commented 3 years ago

Having the same issue on MacOS M1 - have installed the needed homebrew packages Did anyone find any solution to this?

I installed Python 15.2 with pyenv and it worked find now.

what is Python 15.2 ?

s-udhaya commented 3 years ago

Does this library works at all? I am not able to install and also many others ,

fbertoia commented 3 years ago

Hello, back again. I retried, but still facing the same error...

kallewoof commented 3 years ago

Someone I'm assisting is running into this on an M1. Edit: by this I specifically mean the undefined memcpy error observed by @fbertoia.

CyrusVorwald commented 2 years ago

I am also having this issue on M1

callebtc commented 2 years ago

My issue on M1 Monterey:

$ python -m secp256k1

Traceback (most recent call last):
  File "/Users/calle/.pyenv/versions/3.8.13/lib/python3.8/runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/Users/calle/.pyenv/versions/3.8.13/lib/python3.8/runpy.py", line 144, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/Users/calle/.pyenv/versions/3.8.13/lib/python3.8/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/Users/calle/.local/share/virtualenvs/lnbits-legend-G1VlS8Oy/lib/python3.8/site-packages/secp256k1/__init__.py", line 5, in <module>
    from ._libsecp256k1 import ffi, lib
ImportError: dlopen(/Users/calle/.local/share/virtualenvs/lnbits-legend-G1VlS8Oy/lib/python3.8/site-packages/_cffi_backend.cpython-38-darwin.so, 0x0002): symbol not found in flat namespace '_ffi_prep_closure'

Solution: downgrade cffi to 1.15.0 (from in my case 1.15.1)

pip install cffi==1.15.0
icedrowning commented 2 years ago

pip install secp256k1 ERROR: Could not find a version that satisfies the requirement secp256k1 (from versions: none) ERROR: No matching distribution found for secp256k1

does anyone face this error?

abhay-raizada commented 1 year ago

2023, M1 facing same issues, can anyone help me?

hbasria commented 1 year ago

Here's how I solved it on Apple M1 Ventura

brew install pkg-config libtool libffi gmp
pip install wheel
pip install secp256k1