Errors installing blue_st_sdk and bluepy
Hello, I am trying to run BlueSTSDK_Python in VSCode/Ubuntu but I am getting these errors during installation:
Error Installing BlueSTSDK:
`(.venv) parallels@parallels-Parallels-Virtual-Platform:~/Code/Python/BlueSTSDK_Python$ pip install blue_st_sdk Collecting blue_st_sdk Downloading blue_st_sdk-1.4.0.tar.gz (59 kB) |████████████████████████████████| 59 kB 486 kB/s Building wheels for collected packages: blue-st-sdk Building wheel for blue-st-sdk (setup.py) ... error ERROR: Command errored out with exit status 1: command: /home/parallels/Code/Python/BlueSTSDK_Python/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_vble_t0/blue-st-sdk/setup.py'"'"'; file='"'"'/tmp/pip-install-_vble_t0/blue-st-sdk/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-dkn2c_qu cwd: /tmp/pip-install-_vble_t0/blue-st-sdk/ Complete output (6 lines): usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help
error: invalid command 'bdist_wheel'
ERROR: Failed building wheel for blue-st-sdk Running setup.py clean for blue-st-sdk Failed to build blue-st-sdk Installing collected packages: blue-st-sdk Running setup.py install for blue-st-sdk ... done Successfully installed blue-st-sdk-1.4.0 `
Error Installing BluePY:
`(.venv) parallels@parallels-Parallels-Virtual-Platform:~/Code/Python/BlueSTSDK_Python$ pip install bluepy Collecting bluepy Downloading bluepy-1.3.0.tar.gz (217 kB) |████████████████████████████████| 217 kB 1.0 MB/s Building wheels for collected packages: bluepy Building wheel for bluepy (setup.py) ... error ERROR: Command errored out with exit status 1: command: /home/parallels/Code/Python/BlueSTSDK_Python/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-hzbo9gsd/bluepy/setup.py'"'"'; file='"'"'/tmp/pip-install-hzbo9gsd/bluepy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-x71z6rkk cwd: /tmp/pip-install-hzbo9gsd/bluepy/ Complete output (6 lines): usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help
error: invalid command 'bdist_wheel'
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: Command errored out with exit status 1:
command: /home/parallels/Code/Python/BlueSTSDK_Python/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-hzbo9gsd/bluepy/setup.py'"'"'; file='"'"'/tmp/pip-install-hzbo9gsd/bluepy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-1zq5u9lz/install-record.txt --single-version-externally-managed --compile --install-headers /home/parallels/Code/Python/BlueSTSDK_Python/.venv/include/site/python3.8/bluepy
cwd: /tmp/pip-install-hzbo9gsd/bluepy/
Complete output (11 lines):
running install
running build
running build_py
Working dir is /tmp/pip-install-hzbo9gsd/bluepy
execute make -C ./bluepy clean
execute make -C bluepy -j1
Failed to compile bluepy-helper. Exiting install.
Command was 'make -C bluepy -j1' in /tmp/pip-install-hzbo9gsd/bluepy
Return code was 2
Output was:
b"make: Entering directory '/tmp/pip-install-hzbo9gsd/bluepy/bluepy'\ntar 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\nPackage glib-2.0 was not found in the pkg-config search path.\nPerhaps you should add the directory containing glib-2.0.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'glib-2.0' found\nPackage glib-2.0 was not found in the pkg-config search path.\nPerhaps you should add the directory containing glib-2.0.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'glib-2.0' 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: No such file or directory\n 33 | #include <glib.h>\n | ^~~~~~~~\ncompilation terminated.\n./bluez-5.47/attrib/att.c:33:10: fatal error: glib.h: No such file or directory\n 33 | #include <glib.h>\n | ^~~~~~~~\ncompilation terminated.\n./bluez-5.47/attrib/gatt.c:32:10: fatal error: glib.h: No such file or directory\n 32 | #include <glib.h>\n | ^~~~~~~~\ncompilation terminated.\n./bluez-5.47/attrib/gattrib.c:34:10: fatal error: glib.h: No such file or directory\n 34 | #include <glib.h>\n | ^~~~~~~~\ncompilation terminated.\n./bluez-5.47/attrib/utils.c:30:10: fatal error: glib.h: No such file or directory\n 30 | #include <glib.h>\n | ^~~~~~~~\ncompilation terminated.\n./bluez-5.47/btio/btio.c:37:10: fatal error: glib.h: No such file or directory\n 37 | #include <glib.h>\n | ^~~~~~~~\ncompilation terminated.\n./bluez-5.47/src/log.c:38:10: fatal error: glib.h: No such file or directory\n 38 | #include <glib.h>\n | ^~~~~~~~\ncompilation terminated.\n./bluez-5.47/src/shared/io-glib.c:30:10: fatal error: glib.h: No such file or directory\n 30 | #include <glib.h>\n | ^~~~~~~~\ncompilation terminated.\n./bluez-5.47/src/shared/timeout-glib.c:22:10: fatal error: glib.h: No such file or directory\n 22 | #include <glib.h>\n | ^~~~~~~~\ncompilation terminated.\nmake: *** [Makefile:30: bluepy-helper] Error 1\nmake: Leaving directory '/tmp/pip-install-hzbo9gsd/bluepy/bluepy'\n"
----------------------------------------
ERROR: Command errored out with exit status 1: /home/parallels/Code/Python/BlueSTSDK_Python/.venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-hzbo9gsd/bluepy/setup.py'"'"'; file='"'"'/tmp/pip-install-hzbo9gsd/bluepy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-1zq5u9lz/install-record.txt --single-version-externally-managed --compile --install-headers /home/parallels/Code/Python/BlueSTSDK_Python/.venv/include/site/python3.8/bluepy Check the logs for full command output.
`
What am I missing?
Another question: Are there any plans to support Windows too?
Thanks,
Alvaro
i had the same problem.
sudo apt-get install libglib2.0-dev python3-dev
fixed it