Skip to content

PyGObject fails to install via pip on Ubuntu 24.04 #10

@franjaluga

Description

@franjaluga

Environment:

  • OS: Ubuntu 24.04 (Linux Mint based)
  • Python: 3.11 / 3.12 (tested in venv)
  • Pip: latest
  • Project: OpenWebTTS (requirements.txt)

Steps to reproduce

git clone <repo>
cd OpenWebTTS
python3 -m venv openvenv
source openvenv/bin/activate
pip install -r requirements.txt

Observed behavior

  • pip fails while building PyGObject from source.
  • Error message:
    ERROR: Dependency 'girepository-2.0' is required but not found.
    
  • Even with libgirepository1.0-dev, libglib2.0-dev, pkg-config, etc. installed, the build fails.
  • Root cause: PyGObject is not intended to be installed from PyPI on Ubuntu/Debian, it should come from system packages.

Workaround

  1. Install PyGObject via apt:
    sudo apt install -y python3-gi python3-gi-cairo gir1.2-gtk-3.0
    
  2. Remove PyGObject from requirements.txt.
  3. Install remaining requirements with pip:
    pip install -r requirements.txt
    

Suggested fix

  • Remove PyGObject from requirements.txt (or mark it as optional).
  • Update the README with extra system dependencies for Ubuntu/Debian:
    sudo apt install -y python3-gi python3-gi-cairo gir1.2-gtk-3.0
    
  • This avoids build failures and simplifies project setup on Linux.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions