ebellocchia / bip_utils

Generation of mnemonics, seeds, private/public keys and addresses for different types of cryptocurrencies
MIT License
292 stars 83 forks source link

Not installing on M1 w/Python 3.11.4 #106

Closed FrankC01 closed 11 months ago

FrankC01 commented 11 months ago

OS: Ventura (M1)

I have pyenv set to 3.11.4 in local venvl env

requirements.txt bip-utils==2.7.0

installing

. env/bin/activate
pip install -r requirements.txt

$ pip install -r requirements.txt
Collecting bip-utils==2.7.0 (from -r requirements.txt (line 1))
  Using cached bip_utils-2.7.0-py3-none-any.whl (575 kB)
Collecting cbor2~=5.1 (from bip-utils==2.7.0->-r requirements.txt (line 1))
  Using cached cbor2-5.4.6-cp311-cp311-macosx_11_0_arm64.whl (61 kB)
Collecting coincurve<18.0.0,>=15.0.1 (from bip-utils==2.7.0->-r requirements.txt (line 1))
  Using cached coincurve-17.0.0.tar.gz (2.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting crcmod~=1.7 (from bip-utils==2.7.0->-r requirements.txt (line 1))
  Using cached crcmod-1.7-cp311-cp311-macosx_13_0_arm64.whl
Collecting ecdsa~=0.15 (from bip-utils==2.7.0->-r requirements.txt (line 1))
  Using cached ecdsa-0.18.0-py2.py3-none-any.whl (142 kB)
Collecting ed25519-blake2b~=1.4 (from bip-utils==2.7.0->-r requirements.txt (line 1))
  Using cached ed25519_blake2b-1.4-cp311-cp311-macosx_13_0_arm64.whl
Collecting pycryptodome~=3.6 (from bip-utils==2.7.0->-r requirements.txt (line 1))
  Obtaining dependency information for pycryptodome~=3.6 from https://files.pythonhosted.org/packages/ea/a8/79c30c277edae8450c28a18b33f0499414f023b1f45b75c6ea5f738f0955/pycryptodome-3.18.0-cp35-abi3-macosx_10_9_universal2.whl.metadata
  Using cached pycryptodome-3.18.0-cp35-abi3-macosx_10_9_universal2.whl.metadata (3.4 kB)
Collecting pynacl~=1.4 (from bip-utils==2.7.0->-r requirements.txt (line 1))
  Using cached PyNaCl-1.5.0-cp36-abi3-macosx_10_10_universal2.whl (349 kB)
Collecting py-sr25519-bindings<2.0.0,>=0.1.3 (from bip-utils==2.7.0->-r requirements.txt (line 1))
  Using cached py_sr25519_bindings-0.2.0-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (610 kB)
Collecting asn1crypto (from coincurve<18.0.0,>=15.0.1->bip-utils==2.7.0->-r requirements.txt (line 1))
  Using cached asn1crypto-1.5.1-py2.py3-none-any.whl (105 kB)
Collecting cffi>=1.3.0 (from coincurve<18.0.0,>=15.0.1->bip-utils==2.7.0->-r requirements.txt (line 1))
  Using cached cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl (174 kB)
Collecting six>=1.9.0 (from ecdsa~=0.15->bip-utils==2.7.0->-r requirements.txt (line 1))
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting pycparser (from cffi>=1.3.0->coincurve<18.0.0,>=15.0.1->bip-utils==2.7.0->-r requirements.txt (line 1))
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Using cached pycryptodome-3.18.0-cp35-abi3-macosx_10_9_universal2.whl (2.4 MB)
Building wheels for collected packages: coincurve
  Building wheel for coincurve (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for coincurve (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [73 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-13.4-arm64-cpython-311
      creating build/lib.macosx-13.4-arm64-cpython-311/coincurve
      copying coincurve/_windows_libsecp256k1.py -> build/lib.macosx-13.4-arm64-cpython-311/coincurve
      copying coincurve/flags.py -> build/lib.macosx-13.4-arm64-cpython-311/coincurve
      copying coincurve/__init__.py -> build/lib.macosx-13.4-arm64-cpython-311/coincurve
      copying coincurve/keys.py -> build/lib.macosx-13.4-arm64-cpython-311/coincurve
      copying coincurve/types.py -> build/lib.macosx-13.4-arm64-cpython-311/coincurve
      copying coincurve/context.py -> build/lib.macosx-13.4-arm64-cpython-311/coincurve
      copying coincurve/utils.py -> build/lib.macosx-13.4-arm64-cpython-311/coincurve
      copying coincurve/ecdsa.py -> build/lib.macosx-13.4-arm64-cpython-311/coincurve
      copying coincurve/py.typed -> build/lib.macosx-13.4-arm64-cpython-311/coincurve
      running build_clib
      Can't exec "aclocal": No such file or directory at /opt/homebrew/Cellar/autoconf/2.71/share/autoconf/Autom4te/FileUtils.pm line 274.
      autoreconf: error: aclocal failed with exit status: 2
      Traceback (most recent call last):
        File "/Users/fastfrank/frankc01/allpysui/env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/fastfrank/frankc01/allpysui/env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/fastfrank/frankc01/allpysui/env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/57/j306hyks2756q0y4d54frrpr0000gn/T/pip-build-env-w0qfy3pg/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 416, in build_wheel
          return self._build_with_temp_dir(['bdist_wheel'], '.whl',
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/57/j306hyks2756q0y4d54frrpr0000gn/T/pip-build-env-w0qfy3pg/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 401, in _build_with_temp_dir
          self.run_setup()
        File "/private/var/folders/57/j306hyks2756q0y4d54frrpr0000gn/T/pip-build-env-w0qfy3pg/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 488, in run_setup
          self).run_setup(setup_script=setup_script)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/57/j306hyks2756q0y4d54frrpr0000gn/T/pip-build-env-w0qfy3pg/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 264, in <module>
        File "/private/var/folders/57/j306hyks2756q0y4d54frrpr0000gn/T/pip-build-env-w0qfy3pg/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/57/j306hyks2756q0y4d54frrpr0000gn/T/pip-build-env-w0qfy3pg/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/57/j306hyks2756q0y4d54frrpr0000gn/T/pip-build-env-w0qfy3pg/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/private/var/folders/57/j306hyks2756q0y4d54frrpr0000gn/T/pip-build-env-w0qfy3pg/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/private/var/folders/57/j306hyks2756q0y4d54frrpr0000gn/T/pip-build-env-w0qfy3pg/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/private/var/folders/57/j306hyks2756q0y4d54frrpr0000gn/T/pip-build-env-w0qfy3pg/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "<string>", line 97, in run
        File "/private/var/folders/57/j306hyks2756q0y4d54frrpr0000gn/T/pip-build-env-w0qfy3pg/overlay/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 343, in run
          self.run_command("build")
        File "/private/var/folders/57/j306hyks2756q0y4d54frrpr0000gn/T/pip-build-env-w0qfy3pg/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/private/var/folders/57/j306hyks2756q0y4d54frrpr0000gn/T/pip-build-env-w0qfy3pg/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/private/var/folders/57/j306hyks2756q0y4d54frrpr0000gn/T/pip-build-env-w0qfy3pg/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/private/var/folders/57/j306hyks2756q0y4d54frrpr0000gn/T/pip-build-env-w0qfy3pg/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/private/var/folders/57/j306hyks2756q0y4d54frrpr0000gn/T/pip-build-env-w0qfy3pg/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/private/var/folders/57/j306hyks2756q0y4d54frrpr0000gn/T/pip-build-env-w0qfy3pg/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/private/var/folders/57/j306hyks2756q0y4d54frrpr0000gn/T/pip-build-env-w0qfy3pg/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "<string>", line 154, in run
        File "/Users/fastfrank/.pyenv/versions/3.11.4/lib/python3.11/subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/private/var/folders/57/j306hyks2756q0y4d54frrpr0000gn/T/pip-install-pwi690ei/coincurve_d537d7cbbbf846099b1841e000a9deda/libsecp256k1/autogen.sh']' returned non-zero exit status 2.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for coincurve
Failed to build coincurve
ERROR: Could not build wheels for coincurve, which is required to install pyproject.toml-based projects
ebellocchia commented 11 months ago

Hello, that's a coincurve library problem, you should open the issue on the coincurve page.

Emanuele

FrankC01 commented 11 months ago

coincurve installs fine:

$ pip install coincurve
Collecting coincurve
  Using cached coincurve-18.0.0-cp311-cp311-macosx_11_0_arm64.whl (1.2 MB)
Collecting asn1crypto (from coincurve)
  Using cached asn1crypto-1.5.1-py2.py3-none-any.whl (105 kB)
Collecting cffi>=1.3.0 (from coincurve)
  Using cached cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl (174 kB)
Collecting pycparser (from cffi>=1.3.0->coincurve)
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Installing collected packages: asn1crypto, pycparser, cffi, coincurve
Successfully installed asn1crypto-1.5.1 cffi-1.15.1 coincurve-18.0.0 pycparser-2.21

But I don't install it directly, it is pulled in as dependency in bip-utils.

ebellocchia commented 11 months ago

Probably it's because you are installing an older version (==2.7.0) and the coincurve version in the dependency file was older (I remember I updated it at some point) and not compatible with the Apple M1, it should work by installing the last version

Polsaker commented 10 months ago

@ebellocchia Hi. This is still the case with the latest released version and even with the git code. This happens because bip-utils depends on coincurve>=15.0.1,<18.0.0 which explicitly excludes coincurve 18.0.0 which AFAIK is the only version of coincurve that ships aarch64 python 3.11 compatible binaries.

I suggest upping the requirements file to remove the version cap on coincurve or at least allow coincurve 18.0.0

ebellocchia commented 10 months ago

You are right, my bad, I was conviced to have updated it