有没有办法从官方二进制文件 python 安装带有自制软件的 python 模块?

Is there a way to installed python module with homebrew from official binary installed python?

我用的是Python3.6,是官方二进制包安装的

我用自制软件安装了 PyGObject3。
我想使用 Python 中随二进制包安装的 PyGObject3。
(PyPI 上没有 PyGObject3,我不想从自制软件安装 python3.6。)

如何使用官方二进制文件 python 中的自制软件安装包?

OS: macOS 10.12.3

您可以下载并安装 PyGObject3,而无需使用 brew 将其安装到自定义 python。

wget http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.10/pygobject-3.10.0.tar.xz
tar -xf pygobject-3.10.0.tar.xz
cd pygobject-3.10.0
./configure --with-python=PATH
make && make install

将 PATH 替换为您的 python 可执行文件的路径,例如: /Library/Frameworks/Python.framework/Versions/3.6/Python

link 来自 pygobject3 的最新稳定版本。