I am getting the following error when I try to install bluepy like described in the README.
MacOS Monterey 12.5.1 / M1
Python 3.10.7
➜ pip3 install bluepy
Collecting bluepy
Downloading bluepy-1.3.0.tar.gz (217 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 217.9/217.9 kB 2.2 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Building wheels for collected packages: bluepy
Building wheel for bluepy (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
/opt/homebrew/lib/python3.10/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running bdist_wheel
running build
running build_py
Working dir is /private/var/folders/fs/znqbd02s2rb_cr554g5y4tq80000gn/T/pip-install-ltingoix/bluepy_fedb6428f8ed48019ea6e47c38db4c4c
execute make -C ./bluepy clean
execute make -C bluepy -j1
Failed to compile bluepy-helper. Exiting install.
Command was 'make -C bluepy -j1' in /private/var/folders/fs/znqbd02s2rb_cr554g5y4tq80000gn/T/pip-install-ltingoix/bluepy_fedb6428f8ed48019ea6e47c38db4c4c
Return code was 2
Output was:
b"tar xzf bluez-src.tgz\ntouch ./bluez-5.47/lib/bluetooth.c ./bluez-5.47/lib/hci.c ./bluez-5.47/lib/sdp.c ./bluez-5.47/lib/uuid.c ./bluez-5.47/attrib/att.c ./bluez-5.47/attrib/gatt.c ./bluez-5.47/attrib/gattrib.c ./bluez-5.47/attrib/utils.c ./bluez-5.47/btio/btio.c ./bluez-5.47/src/log.c ./bluez-5.47/src/shared/mgmt.c ./bluez-5.47/src/shared/crypto.c ./bluez-5.47/src/shared/att.c ./bluez-5.47/src/shared/queue.c ./bluez-5.47/src/shared/util.c ./bluez-5.47/src/shared/io-glib.c ./bluez-5.47/src/shared/timeout-glib.c\nmake: pkg-config: Command not found\nmake: pkg-config: Command not found\ncc -L. -g -Wall -Os -DHAVE_CONFIG_H -I./bluez-5.47/attrib -I./bluez-5.47 -I./bluez-5.47/lib -I./bluez-5.47/src -I./bluez-5.47/gdbus -I./bluez-5.47/btio -I./bluez-5.47/sys -o bluepy-helper bluepy-helper.c ./bluez-5.47/lib/bluetooth.c ./bluez-5.47/lib/hci.c ./bluez-5.47/lib/sdp.c ./bluez-5.47/lib/uuid.c ./bluez-5.47/attrib/att.c ./bluez-5.47/attrib/gatt.c ./bluez-5.47/attrib/gattrib.c ./bluez-5.47/attrib/utils.c ./bluez-5.47/btio/btio.c ./bluez-5.47/src/log.c ./bluez-5.47/src/shared/mgmt.c ./bluez-5.47/src/shared/crypto.c ./bluez-5.47/src/shared/att.c ./bluez-5.47/src/shared/queue.c ./bluez-5.47/src/shared/util.c ./bluez-5.47/src/shared/io-glib.c ./bluez-5.47/src/shared/timeout-glib.c \nbluepy-helper.c:33:10: fatal error: 'glib.h' file not found\n#include <glib.h>\n ^~~~~~~~\n1 error generated.\nIn file included from ./bluez-5.47/lib/bluetooth.c:38:\n./bluez-5.47/lib/bluetooth.h:36:10: fatal error: 'endian.h' file not found\n#include <endian.h>\n ^~~~~~~~~~\n1 error generated.\nIn file included from ./bluez-5.47/lib/hci.c:44:\n./bluez-5.47/lib/bluetooth.h:36:10: fatal error: 'endian.h' file not found\n#include <endian.h>\n ^~~~~~~~~~\n1 error generated.\nIn file included from ./bluez-5.47/lib/sdp.c:45:\n./bluez-5.47/lib/bluetooth.h:36:10: fatal error: 'endian.h' file not found\n#include <endian.h>\n ^~~~~~~~~~\n1 error generated.\nIn file included from ./bluez-5.47/lib/uuid.c:33:\n./bluez-5.47/lib/bluetooth.h:36:10: fatal error: 'endian.h' file not found\n#include <endian.h>\n ^~~~~~~~~~\n1 error generated.\n./bluez-5.47/attrib/att.c:33:10: fatal error: 'glib.h' file not found\n#include <glib.h>\n ^~~~~~~~\n1 error generated.\n./bluez-5.47/attrib/gatt.c:32:10: fatal error: 'glib.h' file not found\n#include <glib.h>\n ^~~~~~~~\n1 error generated.\n./bluez-5.47/attrib/gattrib.c:34:10: fatal error: 'glib.h' file not found\n#include <glib.h>\n ^~~~~~~~\n1 error generated.\n./bluez-5.47/attrib/utils.c:30:10: fatal error: 'glib.h' file not found\n#include <glib.h>\n ^~~~~~~~\n1 error generated.\n./bluez-5.47/btio/btio.c:37:10: fatal error: 'glib.h' file not found\n#include <glib.h>\n ^~~~~~~~\n1 error generated.\n./bluez-5.47/src/log.c:38:10: fatal error: 'glib.h' file not found\n#include <glib.h>\n ^~~~~~~~\n1 error generated.\nIn file included from ./bluez-5.47/src/shared/mgmt.c:33:\n./bluez-5.47/lib/bluetooth.h:36:10: fatal error: 'endian.h' file not found\n#include <endian.h>\n ^~~~~~~~~~\n1 error generated.\nIn file included from ./bluez-5.47/src/shared/crypto.c:33:\n./bluez-5.47/src/shared/util.h:27:10: fatal error: 'byteswap.h' file not found\n#include <byteswap.h>\n ^~~~~~~~~~~~\n1 error generated.\nIn file included from ./bluez-5.47/src/shared/att.c:34:\n./bluez-5.47/src/shared/util.h:27:10: fatal error: 'byteswap.h' file not found\n#include <byteswap.h>\n ^~~~~~~~~~~~\n1 error generated.\nIn file included from ./bluez-5.47/src/shared/queue.c:28:\n./bluez-5.47/src/shared/util.h:27:10: fatal error: 'byteswap.h' file not found\n#include <byteswap.h>\n ^~~~~~~~~~~~\n1 error generated.\nIn file included from ./bluez-5.47/src/shared/util.c:38:\n./bluez-5.47/src/shared/util.h:27:10: fatal error: 'byteswap.h' file not found\n#include <byteswap.h>\n ^~~~~~~~~~~~\n1 error generated.\n./bluez-5.47/src/shared/io-glib.c:30:10: fatal error: 'glib.h' file not found\n#include <glib.h>\n ^~~~~~~~\n1 error generated.\n./bluez-5.47/src/shared/timeout-glib.c:22:10: fatal error: 'glib.h' file not found\n#include <glib.h>\n ^~~~~~~~\n1 error generated.\nmake: *** [bluepy-helper] Error 1\n"
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for bluepy
Running setup.py clean for bluepy
Failed to build bluepy
Installing collected packages: bluepy
Running setup.py install for bluepy ... error
error: subprocess-exited-with-error
× Running setup.py install for bluepy did not run successfully.
│ exit code: 1
╰─> [15 lines of output]
/opt/homebrew/lib/python3.10/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running install
/opt/homebrew/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
Working dir is /private/var/folders/fs/znqbd02s2rb_cr554g5y4tq80000gn/T/pip-install-ltingoix/bluepy_fedb6428f8ed48019ea6e47c38db4c4c
execute make -C ./bluepy clean
execute make -C bluepy -j1
Failed to compile bluepy-helper. Exiting install.
Command was 'make -C bluepy -j1' in /private/var/folders/fs/znqbd02s2rb_cr554g5y4tq80000gn/T/pip-install-ltingoix/bluepy_fedb6428f8ed48019ea6e47c38db4c4c
Return code was 2
Output was:
b"tar xzf bluez-src.tgz\ntouch ./bluez-5.47/lib/bluetooth.c ./bluez-5.47/lib/hci.c ./bluez-5.47/lib/sdp.c ./bluez-5.47/lib/uuid.c ./bluez-5.47/attrib/att.c ./bluez-5.47/attrib/gatt.c ./bluez-5.47/attrib/gattrib.c ./bluez-5.47/attrib/utils.c ./bluez-5.47/btio/btio.c ./bluez-5.47/src/log.c ./bluez-5.47/src/shared/mgmt.c ./bluez-5.47/src/shared/crypto.c ./bluez-5.47/src/shared/att.c ./bluez-5.47/src/shared/queue.c ./bluez-5.47/src/shared/util.c ./bluez-5.47/src/shared/io-glib.c ./bluez-5.47/src/shared/timeout-glib.c\nmake: pkg-config: Command not found\nmake: pkg-config: Command not found\ncc -L. -g -Wall -Os -DHAVE_CONFIG_H -I./bluez-5.47/attrib -I./bluez-5.47 -I./bluez-5.47/lib -I./bluez-5.47/src -I./bluez-5.47/gdbus -I./bluez-5.47/btio -I./bluez-5.47/sys -o bluepy-helper bluepy-helper.c ./bluez-5.47/lib/bluetooth.c ./bluez-5.47/lib/hci.c ./bluez-5.47/lib/sdp.c ./bluez-5.47/lib/uuid.c ./bluez-5.47/attrib/att.c ./bluez-5.47/attrib/gatt.c ./bluez-5.47/attrib/gattrib.c ./bluez-5.47/attrib/utils.c ./bluez-5.47/btio/btio.c ./bluez-5.47/src/log.c ./bluez-5.47/src/shared/mgmt.c ./bluez-5.47/src/shared/crypto.c ./bluez-5.47/src/shared/att.c ./bluez-5.47/src/shared/queue.c ./bluez-5.47/src/shared/util.c ./bluez-5.47/src/shared/io-glib.c ./bluez-5.47/src/shared/timeout-glib.c \nbluepy-helper.c:33:10: fatal error: 'glib.h' file not found\n#include <glib.h>\n ^~~~~~~~\n1 error generated.\nIn file included from ./bluez-5.47/lib/bluetooth.c:38:\n./bluez-5.47/lib/bluetooth.h:36:10: fatal error: 'endian.h' file not found\n#include <endian.h>\n ^~~~~~~~~~\n1 error generated.\nIn file included from ./bluez-5.47/lib/hci.c:44:\n./bluez-5.47/lib/bluetooth.h:36:10: fatal error: 'endian.h' file not found\n#include <endian.h>\n ^~~~~~~~~~\n1 error generated.\nIn file included from ./bluez-5.47/lib/sdp.c:45:\n./bluez-5.47/lib/bluetooth.h:36:10: fatal error: 'endian.h' file not found\n#include <endian.h>\n ^~~~~~~~~~\n1 error generated.\nIn file included from ./bluez-5.47/lib/uuid.c:33:\n./bluez-5.47/lib/bluetooth.h:36:10: fatal error: 'endian.h' file not found\n#include <endian.h>\n ^~~~~~~~~~\n1 error generated.\n./bluez-5.47/attrib/att.c:33:10: fatal error: 'glib.h' file not found\n#include <glib.h>\n ^~~~~~~~\n1 error generated.\n./bluez-5.47/attrib/gatt.c:32:10: fatal error: 'glib.h' file not found\n#include <glib.h>\n ^~~~~~~~\n1 error generated.\n./bluez-5.47/attrib/gattrib.c:34:10: fatal error: 'glib.h' file not found\n#include <glib.h>\n ^~~~~~~~\n1 error generated.\n./bluez-5.47/attrib/utils.c:30:10: fatal error: 'glib.h' file not found\n#include <glib.h>\n ^~~~~~~~\n1 error generated.\n./bluez-5.47/btio/btio.c:37:10: fatal error: 'glib.h' file not found\n#include <glib.h>\n ^~~~~~~~\n1 error generated.\n./bluez-5.47/src/log.c:38:10: fatal error: 'glib.h' file not found\n#include <glib.h>\n ^~~~~~~~\n1 error generated.\nIn file included from ./bluez-5.47/src/shared/mgmt.c:33:\n./bluez-5.47/lib/bluetooth.h:36:10: fatal error: 'endian.h' file not found\n#include <endian.h>\n ^~~~~~~~~~\n1 error generated.\nIn file included from ./bluez-5.47/src/shared/crypto.c:33:\n./bluez-5.47/src/shared/util.h:27:10: fatal error: 'byteswap.h' file not found\n#include <byteswap.h>\n ^~~~~~~~~~~~\n1 error generated.\nIn file included from ./bluez-5.47/src/shared/att.c:34:\n./bluez-5.47/src/shared/util.h:27:10: fatal error: 'byteswap.h' file not found\n#include <byteswap.h>\n ^~~~~~~~~~~~\n1 error generated.\nIn file included from ./bluez-5.47/src/shared/queue.c:28:\n./bluez-5.47/src/shared/util.h:27:10: fatal error: 'byteswap.h' file not found\n#include <byteswap.h>\n ^~~~~~~~~~~~\n1 error generated.\nIn file included from ./bluez-5.47/src/shared/util.c:38:\n./bluez-5.47/src/shared/util.h:27:10: fatal error: 'byteswap.h' file not found\n#include <byteswap.h>\n ^~~~~~~~~~~~\n1 error generated.\n./bluez-5.47/src/shared/io-glib.c:30:10: fatal error: 'glib.h' file not found\n#include <glib.h>\n ^~~~~~~~\n1 error generated.\n./bluez-5.47/src/shared/timeout-glib.c:22:10: fatal error: 'glib.h' file not found\n#include <glib.h>\n ^~~~~~~~\n1 error generated.\nmake: *** [bluepy-helper] Error 1\n"
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> bluepy
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I am getting the following error when I try to install bluepy like described in the README.
MacOS Monterey 12.5.1 / M1
Python 3.10.7