Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

libsystemd-dev needed also for installation via pip

未关闭
#138 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
55/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
停滞
技术栈
debian, python
领域
documentation

调研方向

Read the README's Installation and To build from source sections first. Update the Installation section to mention that pip installation requires the Debian libsystemd-dev package, then verify the dependency guidance is consistent with the existing source-build instructions.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
C
星标
522
派生
79
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

systemd/python-systemd 的其他 Issue

查看 systemd/python-systemd 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。