Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Does not install into a venv on Ubuntu 20.04

Open
#125 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
32/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
c, linux, python, ubuntu

Research direction

Start with README.md and reproduce the pip install in an Ubuntu 20.04 Python 3.9 virtual environment. Check the documented packages against the available libsystemd-dev package and inspect the C compilation failure involving systemd/reader.c. Done means the documented dependencies and installation path work in that environment.

Written by the indexing model from the issue text.

Description

The README.md says I can just apt install the headers. However, the only systemd header package available is libsystemd-dev. The others, like libsystemd-journal-dev and libsystemd-daemon-dev do not exist for 20.04, so I can't install them.

If I try to pip install into my venv anyway, I get a bunch of compilation errors (as I figured). They seem related to unicode. Anyway, here's the last lines showing the pip install crashing:

      cython_utility:179:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      In file included from /home/jecompt/.pyenv/versions/3.9.5/include/python3.9/unicodeobject.h:1026,
                       from /home/jecompt/.pyenv/versions/3.9.5/include/python3.9/Python.h:97,
                       from systemd/reader.c:23:
      /home/jecompt/.pyenv/versions/3.9.5/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      cython_utility:179:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      In file included from /home/jecompt/.pyenv/versions/3.9.5/include/python3.9/unicodeobject.h:1026,
                       from /home/jecompt/.pyenv/versions/3.9.5/include/python3.9/Python.h:97,
                       from systemd/reader.c:23:
      /home/jecompt/.pyenv/versions/3.9.5/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      error: command '/usr/bin/gcc' failed with exit code 1
      [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.
╰─> systemd
Dominant language
C
Stars
522
Forks
79
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from systemd/python-systemd

All issues in systemd/python-systemd

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.