【问题标题】:pip3 install pygobject ERROR: Nothing to do, gio could not be found and is essentialpip3 install pygobject ERROR:Nothing to do, gio could not be found and is essential
【发布时间】:2026-01-17 10:10:01
【问题描述】:

我想在 mac OSX 上为 python3 安装 pygobject

pip3 install pygobject

它会在下面引发错误:

$ pip3 install pygobject
Collecting pygobject
  Using cached pygobject-2.28.3.tar.bz2
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/xxxx/pip-build-m79wzagx/pygobject/setup.py", line 272
        raise SystemExit, 'ERROR: Nothing to do, gio could not be found and is essential.'

如何解决这个错误?

【问题讨论】:

  • 要添加到 OSX 中,请参阅 homebrew、macports 或 jhbuild 等选项来构建 pygobject 和朋友。

标签: python macos pygobject


【解决方案1】:

这个python3 pygobject包需要pygobject3,先在Mac OSX上安装pygobject3:

$ brew install pygobject3 --with-python3

$ pip3 install pygobject

【讨论】:

    最近更新 更多