Bluetooth dependencies install problem

I’m having trouble installing the bluetooth dependencies. First “bluepy” was failing, what i was able to resolve by installing manually “python3-pip and libglib2.0-dev”.
Now “pybluez” is failing to install and i have no idea to why. So any help or pointers are appreciated on how to resolve this issue.
I’ve uploaded log file to dropbox, because i can’t attach the file here as i am a new user :slightly_smiling_face:
Dropbox => mycododependency.log
i didn’t clean up the log, so if you wanna see the latest error just scroll at the end.

RPi 4 8GB
RaspOS 12 (bookwork) new install, just for this project

Cheers!

Did you find a solution?
I’m having the same problem when trying to install the dependencies for the Xiaomi Mijia BT Thermometer input. I tried installing from source and on previous versions of piOS. That didn’t work as well…

[2024-07-13 10:43:53] Dependency installation beginning. Installing: bluetooth

[2024-07-13 10:43:53]
[2024-07-13 10:43:53] #### Installing/updating git+htttps://github.com/pybluez/pybluez.git (pip-pypi)
[2024-07-13 10:43:54] Looking in indexes: htttps://pypi.org/simple, htttps://www.piwheels.org/simple
[2024-07-13 10:43:54] Collecting git+htttps://github.com/pybluez/pybluez.git
[2024-07-13 10:43:54] Cloning htttps://github.com/pybluez/pybluez.git to /tmp/pip-req-build-c2oisqkr
[2024-07-13 10:43:54] Running command git clone --filter=blob:none --quiet htttps://github.com/pybluez/pybluez.git /tmp/pip-req-build-c2oisqkr
[2024-07-13 10:43:56] Resolved htttps://github.com/pybluez/pybluez.git to commit 82cbba8a1ebd4c1e3442dfafd8581d58c50fa39e
[2024-07-13 10:43:56] Installing build dependencies: started
[2024-07-13 10:44:01] Installing build dependencies: finished with status ‘done’
[2024-07-13 10:44:01] Getting requirements to build wheel: started
[2024-07-13 10:44:01] Getting requirements to build wheel: finished with status ‘done’
[2024-07-13 10:44:01] Preparing metadata (pyproject.toml): started
[2024-07-13 10:44:02] Preparing metadata (pyproject.toml): finished with status ‘error’
[2024-07-13 10:44:02] error: subprocess-exited-with-error
[2024-07-13 10:44:02]
[2024-07-13 10:44:02] × Preparing metadata (pyproject.toml) did not run successfully.
[2024-07-13 10:44:02] │ exit code: 1
[2024-07-13 10:44:02] ╰─> [58 lines of output]
[2024-07-13 10:44:02] running dist_info
[2024-07-13 10:44:02] creating /tmp/pip-modern-metadata-angm10n8/PyBluez.egg-info
[2024-07-13 10:44:02] writing /tmp/pip-modern-metadata-angm10n8/PyBluez.egg-info/PKG-INFO
[2024-07-13 10:44:02] writing dependency_links to /tmp/pip-modern-metadata-angm10n8/PyBluez.egg-info/dependency_links.txt
[2024-07-13 10:44:02] writing eager_resources to /tmp/pip-modern-metadata-angm10n8/PyBluez.egg-info/eager_resources.txt
[2024-07-13 10:44:02] writing requirements to /tmp/pip-modern-metadata-angm10n8/PyBluez.egg-info/requires.txt
[2024-07-13 10:44:02] writing top-level names to /tmp/pip-modern-metadata-angm10n8/PyBluez.egg-info/top_level.txt
[2024-07-13 10:44:02] writing manifest file ‘/tmp/pip-modern-metadata-angm10n8/PyBluez.egg-info/SOURCES.txt’
[2024-07-13 10:44:02] reading manifest file ‘/tmp/pip-modern-metadata-angm10n8/PyBluez.egg-info/SOURCES.txt’
[2024-07-13 10:44:02] reading manifest template ‘MANIFEST.in’
[2024-07-13 10:44:02] warning: no files found matching ‘README’
[2024-07-13 10:44:02] warning: no files found matching ‘.c’ under directory ‘macos’
[2024-07-13 10:44:02] warning: no previously-included files matching '
.pyc’ found under directory ‘
[2024-07-13 10:44:02] warning: no previously-included files matching '
.o’ found under directory ‘
[2024-07-13 10:44:02] warning: no previously-included files matching '
.opp’ found under directory ‘*’
[2024-07-13 10:44:02] adding license file ‘COPYING’
[2024-07-13 10:44:02] writing manifest file ‘/tmp/pip-modern-metadata-angm10n8/PyBluez.egg-info/SOURCES.txt’
[2024-07-13 10:44:02] creating ‘/tmp/pip-modern-metadata-angm10n8/PyBluez-0.30.dist-info’
[2024-07-13 10:44:02] Traceback (most recent call last):
[2024-07-13 10:44:02] File “/home/pi/Mycodo/env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 353, in
[2024-07-13 10:44:02] main()
[2024-07-13 10:44:02] File “/home/pi/Mycodo/env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 335, in main
[2024-07-13 10:44:02] json_out[‘return_val’] = hook(**hook_input[‘kwargs’])
[2024-07-13 10:44:02] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[2024-07-13 10:44:02] File “/home/pi/Mycodo/env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 149, in prepare_metadata_for_build_wheel
[2024-07-13 10:44:02] return hook(metadata_directory, config_settings)
[2024-07-13 10:44:02] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[2024-07-13 10:44:02] File “/tmp/pip-build-env-c26qeowi/overlay/lib/python3.11/site-packages/setuptools/build_meta.py”, line 368, in prepare_metadata_for_build_wheel
[2024-07-13 10:44:02] self.run_setup()
[2024-07-13 10:44:02] File “/tmp/pip-build-env-c26qeowi/overlay/lib/python3.11/site-packages/setuptools/build_meta.py”, line 497, in run_setup
[2024-07-13 10:44:02] super().run_setup(setup_script=setup_script)
[2024-07-13 10:44:02] File “/tmp/pip-build-env-c26qeowi/overlay/lib/python3.11/site-packages/setuptools/build_meta.py”, line 313, in run_setup
[2024-07-13 10:44:02] exec(code, locals())
[2024-07-13 10:44:02] File “”, line 84, in
[2024-07-13 10:44:02] File “/tmp/pip-build-env-c26qeowi/overlay/lib/python3.11/site-packages/setuptools/init.py”, line 103, in setup
[2024-07-13 10:44:02] return distutils.core.setup(**attrs)
[2024-07-13 10:44:02] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[2024-07-13 10:44:02] File “/tmp/pip-build-env-c26qeowi/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py”, line 184, in setup
[2024-07-13 10:44:02] return run_commands(dist)
[2024-07-13 10:44:02] ^^^^^^^^^^^^^^^^^^
[2024-07-13 10:44:02] File “/tmp/pip-build-env-c26qeowi/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py”, line 200, in run_commands
[2024-07-13 10:44:02] dist.run_commands()
[2024-07-13 10:44:02] File “/tmp/pip-build-env-c26qeowi/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py”, line 970, in run_commands
[2024-07-13 10:44:02] self.run_command(cmd)
[2024-07-13 10:44:02] File “/tmp/pip-build-env-c26qeowi/overlay/lib/python3.11/site-packages/setuptools/dist.py”, line 974, in run_command
[2024-07-13 10:44:02] super().run_command(command)
[2024-07-13 10:44:02] File “/tmp/pip-build-env-c26qeowi/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py”, line 989, in run_command
[2024-07-13 10:44:02] cmd_obj.run()
[2024-07-13 10:44:02] File “/tmp/pip-build-env-c26qeowi/overlay/lib/python3.11/site-packages/setuptools/command/dist_info.py”, line 97, in run
[2024-07-13 10:44:02] bdist_wheel = self.get_finalized_command(‘bdist_wheel’)
[2024-07-13 10:44:02] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[2024-07-13 10:44:02] File “/tmp/pip-build-env-c26qeowi/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py”, line 302, in get_finalized_command
[2024-07-13 10:44:02] cmd_obj = self.distribution.get_command_obj(command, create)
[2024-07-13 10:44:02] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[2024-07-13 10:44:02] File “/tmp/pip-build-env-c26qeowi/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py”, line 863, in get_command_obj
[2024-07-13 10:44:02] cmd_obj = self.command_obj[command] = klass(self)
[2024-07-13 10:44:02] ^^^^^^^^^^^
[2024-07-13 10:44:02] TypeError: ‘NoneType’ object is not callable
[2024-07-13 10:44:02] [end of output]
[2024-07-13 10:44:02]
[2024-07-13 10:44:02] note: This error originates from a subprocess, and is likely not a problem with pip.
[2024-07-13 10:44:02] error: metadata-generation-failed
[2024-07-13 10:44:02]
[2024-07-13 10:44:02] × Encountered error while generating package metadata.
[2024-07-13 10:44:02] ╰─> See above for output.
[2024-07-13 10:44:02]
[2024-07-13 10:44:02] note: This is an issue with the package mentioned above, not pip.
[2024-07-13 10:44:02] hint: See above for details.

[2024-07-13 10:44:02] End install of bluetooth

[2024-07-13 10:44:02]
[2024-07-13 10:44:02] #### Setting permissions

[2024-07-13 10:44:03] #### Dependencies installed. Restarting frontend and backend…

[2024-07-13 10:44:36] #### Dependency install complete.

Cheers!

Shitty thing to say, but good to hear that i’m not alone in this. With no solution in sight for a pretty basic thing like bluetooth i changed my project for another automation software. Sorry but i can’t help. I can only say compared to my log your problem looks to me the same.
Good luck to you.

step by step from my console ./pip executed from (…env/bin):
sudo apt-get install libglib2.0
./pip install bluepy==1.3.0
./pip install cython
./pip install --upgrade pip setuptools wheel
./pip install git+https://github.com/pybluez/pybluez.git#egg=pybluez