Bluetooth-Devices / dbus-fast

A faster version of dbus-next
MIT License
35 stars 8 forks source link

problem installing via pip #282

Closed 3ricj closed 2 months ago

3ricj commented 2 months ago

Describe the bug

I'm not sure what the problem is here:

  Running command Building wheel for dbus-fast (pyproject.toml)
  A setup.py file already exists. Using it.
  Traceback (most recent call last):
    File "/usr/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/usr/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/usr/lib/python3.9/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 "/tmp/pip-build-env-ro9fscn4/overlay/lib/python3.9/site-packages/poetry/core/masonry/api.py", line 58, in build_wheel
      return WheelBuilder.make_in(
    File "/tmp/pip-build-env-ro9fscn4/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 88, in make_in
      wb.build(target_dir=directory)
    File "/tmp/pip-build-env-ro9fscn4/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 121, in build
      self._build(zip_file)
    File "/tmp/pip-build-env-ro9fscn4/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 182, in _build
      self._run_build_command(setup)
    File "/tmp/pip-build-env-ro9fscn4/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 248, in _run_build_command
      subprocess.check_call([
    File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
  subprocess.CalledProcessError: Command '['/usr/bin/python3', '/tmp/pip-install-7qwh8und/dbus-fast_45bd4e30ac004819afa9050f72670d99/setup.py', 'build', '-b', '/tmp/pip-install-7qwh8und/dbus-fast_45bd4e30ac004819afa9050f72670d99/build', '--build-purelib', '/tmp/pip-install-7qwh8und/dbus-fast_45bd4e30ac004819afa9050f72670d99/build/lib', '--build-platlib', '/tmp/pip-install-7qwh8und/dbus-fast_45bd4e30ac004819afa9050f72670d99/build/lib.linux-aarch64-cpython-39']' died with <Signals.SIGKILL: 9>.
  error: subprocess-exited-with-error

  × Building wheel for dbus-fast (pyproject.toml) 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.
  full command: /usr/bin/python3 /usr/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmppahcukdc
  cwd: /tmp/pip-install-7qwh8und/dbus-fast_45bd4e30ac004819afa9050f72670d99
  Building wheel for dbus-fast (pyproject.toml): finished with status 'error'
  ERROR: Failed building wheel for dbus-fast

To Reproduce

Trying to install this python module on my openwrt based router

# uname -a Linux GL-MT3000 5.4.211 #0 SMP Thu Jun 20 15:15:09 2024 aarch64 GNU/Linux

Additional context Add any other context about the problem here.

pip3 and python3 installed via opkg -- updated pip3 to the latest version via pip upgrade.

bdraco commented 2 months ago

subprocess.CalledProcessError: Command '['/usr/bin/python3', '/tmp/pip-install-7qwh8und/dbus-fast_45bd4e30ac004819afa9050f72670d99/setup.py', 'build', '-b', '/tmp/pip-install-7qwh8und/dbus-fast_45bd4e30ac004819afa9050f72670d99/build', '--build-purelib', '/tmp/pip-install-7qwh8und/dbus-fast_45bd4e30ac004819afa9050f72670d99/build/lib', '--build-platlib', '/tmp/pip-install-7qwh8und/dbus-fast_45bd4e30ac004819afa9050f72670d99/build/lib.linux-aarch64-cpython-39']' died with <Signals.SIGKILL: 9>.

Looks like you might have run out of ram.

Check the dmesg to see if the OOM killer got you

3ricj commented 2 months ago

Check the dmesg to see if the OOM killer got you

Yes! That was it.. I'm not sure how to get more ram. This is a very small router -- I will try to stop some unneeded services. I'm not sure why this is showing up now, I've installed lots of larger packages via pip before without issue. It has 512mb of ram. https://www.gl-inet.com/products/gl-mt3000/

bdraco commented 2 months ago

You can install with export SKIP_CYTHON=1 to skip the cython acceleration. It will be much slower though

3ricj commented 2 months ago

That worked perfectly. Thank you.

3ricj commented 2 months ago

export SKIP_CYTHON=1 fixed my problem. Thank you!