Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libsystemd-dev needed also for installation via pip #138

Open
ilario opened this issue Dec 17, 2024 · 0 comments
Open

libsystemd-dev needed also for installation via pip #138

ilario opened this issue Dec 17, 2024 · 0 comments

Comments

@ilario
Copy link

ilario commented Dec 17, 2024

Installing this package with:

pip install systemd-python

On a Debian oldstable (Bullseye), I got an error message very similar to the ones reported in #47 and #97:

pip install systemd-python
Collecting systemd-python
  Downloading systemd-python-235.tar.gz (61 kB)
     |████████████████████████████████| 61 kB 83 kB/s
    ERROR: Command errored out with exit status 1:
     command: /opt/measurement_system-venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3lp1v0wl/systemd-python_605170e387494e1a9bdc2c7ba6ddef4a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3lp1v0wl/systemd-python_605170e387494e1a9bdc2c7ba6ddef4a/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-zqy_tu5b
         cwd: /tmp/pip-install-3lp1v0wl/systemd-python_605170e387494e1a9bdc2c7ba6ddef4a/
    Complete output (12 lines):
    Cannot find libsystemd or libsystemd-journal:

    Package libsystemd was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libsystemd.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libsystemd' found

    Package libsystemd-journal was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libsystemd-journal.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libsystemd-journal' found

    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/10/9e/ab4458e00367223bda2dd7ccf0849a72235ee3e29b36dce732685d9b7ad9/systemd-python-235.tar.gz#sha256=4e57f39797fd5d9e2d22b8806a252d7c0106c936039d1e71c8c6b8008e695c0a (from https://pypi.org/simple/systemd-python/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Downloading systemd-python-234.tar.gz (53 kB)
     |████████████████████████████████| 53 kB 496 kB/s
    ERROR: Command errored out with exit status 1:
     command: /opt/measurement_system-venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3lp1v0wl/systemd-python_fce97db8c3184d04b9266626a33ab67b/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3lp1v0wl/systemd-python_fce97db8c3184d04b9266626a33ab67b/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-2hsisnk0
         cwd: /tmp/pip-install-3lp1v0wl/systemd-python_fce97db8c3184d04b9266626a33ab67b/
    Complete output (12 lines):
    Cannot find libsystemd or libsystemd-journal:

    Package libsystemd was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libsystemd.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libsystemd' found

    Package libsystemd-journal was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libsystemd-journal.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libsystemd-journal' found

    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/e8/a8/00ba0f605837a8f69523e6c3a4fb14675a6430c163f836540129c50b3aef/systemd-python-234.tar.gz#sha256=fd0e44bf70eadae45aadc292cb0a7eb5b0b6372cd1b391228047d33895db83e7 (from https://pypi.org/simple/systemd-python/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Downloading systemd-python-233.tar.gz (49 kB)
     |████████████████████████████████| 49 kB 1.6 MB/s
    ERROR: Command errored out with exit status 1:
     command: /opt/measurement_system-venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3lp1v0wl/systemd-python_bb46b5166fe1470496a4586b7b1b3884/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3lp1v0wl/systemd-python_bb46b5166fe1470496a4586b7b1b3884/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-95vgxi6u
         cwd: /tmp/pip-install-3lp1v0wl/systemd-python_bb46b5166fe1470496a4586b7b1b3884/
    Complete output (12 lines):
    Cannot find libsystemd or libsystemd-journal:

    Package libsystemd was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libsystemd.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libsystemd' found

    Package libsystemd-journal was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libsystemd-journal.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libsystemd-journal' found

    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/10/89/d66ae73bdbc2614e4f2e90ddf9ef80d22c28f3cd70071345c3640465c14c/systemd-python-233.tar.gz#sha256=06a3768b744884565d7961b44f4a51d164765bc59692f0f85ea6f11330a17da4 (from https://pypi.org/simple/systemd-python/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Downloading systemd-python-232.tar.gz (49 kB)
     |████████████████████████████████| 49 kB 1.4 MB/s
    ERROR: Command errored out with exit status 1:
     command: /opt/measurement_system-venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3lp1v0wl/systemd-python_f10a8673949f4842a0bb53f7ea5fe779/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3lp1v0wl/systemd-python_f10a8673949f4842a0bb53f7ea5fe779/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-oql0295y
         cwd: /tmp/pip-install-3lp1v0wl/systemd-python_f10a8673949f4842a0bb53f7ea5fe779/
    Complete output (12 lines):
    Cannot find libsystemd or libsystemd-journal:

    Package libsystemd was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libsystemd.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libsystemd' found

    Package libsystemd-journal was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libsystemd-journal.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libsystemd-journal' found

    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/87/a3/e73a8373d40b05a75bb34fdccae606ab4dc0c0743535289904f15eb624f5/systemd-python-232.tar.gz#sha256=e5d0fdbdf50e7d67c77e08bc7986ef41d98aef222896bc033c27477893c3d4ba (from https://pypi.org/simple/systemd-python/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement systemd-python
ERROR: No matching distribution found for systemd-python

Installing libsystemd-dev with apt install libsystemd-dev allowed me to install the package.

I would mention this also in the "Installation" section of the Readme (that is the section I read when I tried to install via pip...) and not only in the "To build from source" one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant