question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installation fails

See original GitHub issue

I made a fresh installation on my RPi4 with 64bit Bullseye. So, Mosquitto, NodeRed and Zigbee2mqtt are really updated. I hope this daemon is exactly what I am looking for to read out miflora (and maybe other BLE-sensors, too)… but I cannot install:

sudo pip3 install -r requirements.txt
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting miflora==0.7.1
  Downloading https://www.piwheels.org/simple/miflora/miflora-0.7.1-py3-none-any                                                                .whl (23 kB)
Collecting bluepy==1.3.0
  Downloading bluepy-1.3.0.tar.gz (217 kB)
     |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 217 kB 2.7 MB/s
Collecting btlewrap==0.0.10
  Downloading https://www.piwheels.org/simple/btlewrap/btlewrap-0.0.10-py3-none-                                                                any.whl (19 kB)
Collecting paho-mqtt==1.4.0
  Downloading https://www.piwheels.org/simple/paho-mqtt/paho_mqtt-1.4.0-py3-none                                                                -any.whl (48 kB)
     |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 48 kB 1.1 MB/s
Collecting wheel==0.29.0
  Downloading https://www.piwheels.org/simple/wheel/wheel-0.29.0-py2.py3-none-an                                                                y.whl (66 kB)
     |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 66 kB 900 kB/s
Collecting sdnotify==0.3.1
  Downloading https://www.piwheels.org/simple/sdnotify/sdnotify-0.3.1-py3-none-a                                                                ny.whl (4.3 kB)
Collecting colorama==0.3.9
  Downloading https://www.piwheels.org/simple/colorama/colorama-0.3.9-py2.py3-no                                                                ne-any.whl (20 kB)
Collecting Unidecode==0.4.21
  Downloading https://www.piwheels.org/simple/unidecode/Unidecode-0.04.21-py2.py                                                                3-none-any.whl (228 kB)
     |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 228 kB 3.3 MB/s
Building wheels for collected packages: bluepy
  Building wheel for bluepy (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0                                                                ] = '"'"'/tmp/pip-install-v5kd4we3/bluepy_12e6272774d84703aedf0f2715964ef9/setup                                                                .py'"'"'; __file__='"'"'/tmp/pip-install-v5kd4we3/bluepy_12e6272774d84703aedf0f2                                                                715964ef9/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code                                                                =f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __f                                                                ile__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-ah5c0qzd
       cwd: /tmp/pip-install-v5kd4we3/bluepy_12e6272774d84703aedf0f2715964ef9/
  Complete output (11 lines):
  running bdist_wheel
  running build
  running build_py
  Working dir is /tmp/pip-install-v5kd4we3/bluepy_12e6272774d84703aedf0f2715964e                                                                f9
  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-v5kd4we3/bluepy_12e627277                                                                4d84703aedf0f2715964ef9
  Return code was 2
  Output was:
  b"make: Entering directory '/tmp/pip-install-v5kd4we3/bluepy_12e6272774d84703a                                                                edf0f2715964ef9/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 ./bl                                                                uez-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.4                                                                7/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 directo                                                                ry containing `glib-2.0.pc'\nto the PKG_CONFIG_PATH environment variable\nNo pac                                                                kage 'glib-2.0' found\nPackage glib-2.0 was not found in the pkg-config search p                                                                ath.\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 b                                                                luepy-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 ./blue                                                                z-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/sh                                                                ared/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: gl                                                                ib.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 e                                                                rror: glib.h: No such file or directory\n   30 | #include <glib.h>\n      |                                                                          ^~~~~~~~\ncompilation terminated.\n./bluez-5.47/src/shared/timeout-glib.c:2                                                                2:10: fatal error: glib.h: No such file or directory\n   22 | #include <glib.h>\                                                                n      |          ^~~~~~~~\ncompilation terminated.\nmake: *** [Makefile:30: blu                                                                epy-helper] Error 1\nmake: Leaving directory '/tmp/pip-install-v5kd4we3/bluepy_1                                                                2e6272774d84703aedf0f2715964ef9/bluepy'\n"
  ----------------------------------------
  ERROR: Failed building wheel for bluepy
  Running setup.py clean for bluepy
Failed to build bluepy
Installing collected packages: btlewrap, wheel, Unidecode, sdnotify, paho-mqtt,                                                                 miflora, colorama, bluepy
  Attempting uninstall: wheel
    Found existing installation: wheel 0.34.2
    Not uninstalling wheel at /usr/lib/python3/dist-packages, outside environmen                                                                t /usr
    Can't uninstall 'wheel'. No files were found to uninstall.
    Running setup.py install for bluepy ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv                                                                [0] = '"'"'/tmp/pip-install-v5kd4we3/bluepy_12e6272774d84703aedf0f2715964ef9/set                                                                up.py'"'"'; __file__='"'"'/tmp/pip-install-v5kd4we3/bluepy_12e6272774d84703aedf0                                                                f2715964ef9/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);co                                                                de=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, _                                                                _file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-59ciryh_/install-rec                                                                ord.txt --single-version-externally-managed --compile --install-headers /usr/loc                                                                al/include/python3.9/bluepy
         cwd: /tmp/pip-install-v5kd4we3/bluepy_12e6272774d84703aedf0f2715964ef9/
    Complete output (11 lines):
    running install
    running build
    running build_py
    Working dir is /tmp/pip-install-v5kd4we3/bluepy_12e6272774d84703aedf0f271596                                                                4ef9
    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-v5kd4we3/bluepy_12e6272                                                                774d84703aedf0f2715964ef9
    Return code was 2
    Output was:
    b"make: Entering directory '/tmp/pip-install-v5kd4we3/bluepy_12e6272774d8470                                                                3aedf0f2715964ef9/bluepy'\ntar xzf bluez-src.tgz\ntouch ./bluez-5.47/lib/bluetoo                                                                th.c ./bluez-5.47/lib/hci.c ./bluez-5.47/lib/sdp.c ./bluez-5.47/lib/uuid.c ./blu                                                                ez-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 ./blue                                                                z-5.47/src/shared/mgmt.c ./bluez-5.47/src/shared/crypto.c ./bluez-5.47/src/share                                                                d/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 direc                                                                tory containing `glib-2.0.pc'\nto the PKG_CONFIG_PATH environment variable\nNo p                                                                ackage '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 PK                                                                G_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 ./bl                                                                uez-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: gli                                                                b.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: gli                                                                b.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: gl                                                                ib.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 err                                                                or: 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 erro                                                                r: 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: b                                                                luepy-helper] Error 1\nmake: Leaving directory '/tmp/pip-install-v5kd4we3/bluepy                                                                _12e6272774d84703aedf0f2715964ef9/bluepy'\n"
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sy                                                                s, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-v5kd4we3/bluepy_12e                                                                6272774d84703aedf0f2715964ef9/setup.py'"'"'; __file__='"'"'/tmp/pip-install-v5kd                                                                4we3/bluepy_12e6272774d84703aedf0f2715964ef9/setup.py'"'"';f=getattr(tokenize, '                                                                "'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"                                                                ');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tm                                                                p/pip-record-59ciryh_/install-record.txt --single-version-externally-managed --c                                                                ompile --install-headers /usr/local/include/python3.9/bluepy Check the logs for                                                                 full command output.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
batjecommented, Apr 1, 2022

I had the same error, with a bit more detail:

b"make: Entering directory β€˜/tmp/pip-install-awh6wojw/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 #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 #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 #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 #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 #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 #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 #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 #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 #include <glib.h>\n ^~~~~~~~\ncompilation terminated.\nmake: *** [Makefile:30: bluepy-helper] Error 1\nmake: Leaving directory β€˜/tmp/pip-install-awh6wojw/bluepy/bluepy’\n"

Which translates to

fatal error: glib.h: No such file or directory

Which let me to here

Where they advise to try:

sudo apt-get install libglib2.0-dev 

Which solved the problem on my raspberry Pi

0reactions
ThomDietrichcommented, Jul 13, 2022

Hey guys, in summary, what should be added to the README? PR welcome!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[SOLVED] Windows 10 Installation Has Failed - Driver Easy
[SOLVED] Windows 10 Installation Has Failed Β· Try these fixes… Β· Fix 1: Remove the peripheral devices Β· Fix 2: Clear an attribute...
Read more >
How to Fix "Windows 10 Installation has Failed" Error? - Appuals
How to Fix β€œWindows 10 Installation has Failed” Error? Β· 1. Meet the minimum requirements Β· 2. Remove all non-essential peripherals Β· 3....
Read more >
4 Solutions to Fix Windows 10/11 Installation Has Failed
4 Solutions to Fix the "Windows 10/11 installation has failed" Error Β· Solution 1: Run a Clean Boot Installation Β· Solution 2: Create...
Read more >
Windows 10 Installation Has Failed [Easily FIXED]
To fix Windows installation has failed error on your PC, be sure to check all the solutions from this quick and easy guide....
Read more >
[SOLVED] Windows 10 Could Not Complete the Installation + ...
Case 2: Windows 10 Installation Has Failed Β· Fix 1. Check Whether Your Computer Meets the Minimum Requirements Β· Fix 2. Clear Certain...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found