joinmarket-clientserver icon indicating copy to clipboard operation
joinmarket-clientserver copied to clipboard

Error installing joinmarket dependencies on ubuntu server 24.04: Getting requirements to build wheel did not run successfully

Open emmedigitnet opened this issue 6 months ago • 8 comments

Hi, tried to install JM on clean ubuntu server 24.04, with only bitcoin knots and electrs.

Got this error:

`Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [49 lines of output] :7: SetuptoolsDeprecationWarning: The test command is disabled and references to it are deprecated. !!

          ********************************************************************************
          Please remove any references to `setuptools.command.test` in all supported versions of the affected package.
  
          This deprecation is overdue, please update your project and remove deprecated
          calls to avoid build errors in the future.
          ********************************************************************************
  
  !!
  
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
  
  
  encode_func = {
      int: encode_int,
      bool: encode_int,
      long: encode_long,
      ^
  ------------------------------------------------------------
  
  bencoder.pyx:152:4: undeclared name not builtin: long
  Compiling bencoder.pyx because it changed.
  [1/1] Cythonizing bencoder.pyx
  Traceback (most recent call last):
    File "/home/username/joinmarket-clientserver/jmvenv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/home/username/joinmarket-clientserver/jmvenv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/username/joinmarket-clientserver/jmvenv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-li6_xxam/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=[])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/pip-build-env-li6_xxam/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-li6_xxam/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 317, in run_setup
      exec(code, locals())
    File "<string>", line 24, in <module>
    File "/tmp/pip-build-env-li6_xxam/overlay/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
      cythonize_one(*args)
    File "/tmp/pip-build-env-li6_xxam/overlay/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 1298, in cythonize_one
      raise CompileError(None, pyx_file)
  Cython.Compiler.Errors.CompileError: bencoder.pyx
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.`

Any idea? Thanks

emmedigitnet avatar Jun 14 '25 11:06 emmedigitnet

GitHub CI also shows the same error with ubuntu-latest currently.

kristapsk avatar Jul 05 '25 12:07 kristapsk

But I cannot reproduce this locally on neither Ubuntu 24.04.1 nor 22.02.5.

kristapsk avatar Jul 05 '25 13:07 kristapsk

The issue appears to be that bencoder.pyx 3.0.1 is incompatible with Python >3.12, and that we're using newer version of python.

I resolved this by using a python 3.11 venv -- you might also have luck installing 3.11 or lower using your package manager and provided the --python [binary?] flag to ./install.sh.

JoinMarket advises compatibility between <3.13, perhaps it should be <3.12 until bencoder.pyx is fixed.

tbiehn avatar Jul 12 '25 16:07 tbiehn

The issue appears to be that bencoder.pyx 3.0.1 is incompatible with Python >3.12, and that we're using newer version of python.

I resolved this by using a python 3.11 venv -- you might also have luck installing 3.11 or lower using your package manager and provided the --python [binary?] flag to ./install.sh.

JoinMarket advises compatibility between <3.13, perhaps it should be <3.12 until bencoder.pyx is fixed.

Great; I had already installed python 3.10 too, but it didn't work. With --python option in install.sh did!! Really thanks

emmedigitnet avatar Jul 16 '25 09:07 emmedigitnet

This shouldn't be closed, this is still an issue, with Python 3.12, I was able to reproduce on my machine.

kristapsk avatar Jul 19 '25 05:07 kristapsk

This shouldn't be closed, this is still an issue, with Python 3.12, I was able to reproduce on my machine.

Sure, ok sorry

emmedigitnet avatar Jul 19 '25 10:07 emmedigitnet

Proposed fix in #1802

3nprob avatar Sep 27 '25 01:09 3nprob

This should be resolved as of #1809

While python3.13 support is not yet configured, https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/1814#issuecomment-3452635150 indicates that it might already work there too

3nprob avatar Oct 28 '25 04:10 3nprob