gpt4 book ai didi

python - 如何安装支持 Python 3 的 PyGObject

转载 作者:IT王子 更新时间:2023-10-29 00:54:02 29 4
gpt4 key购买 nike

我一直在尝试使用多种方法安装 PyGObject。首先,使用 apt-get 但这只会为 Python 2.x 安装它。接下来,我尝试自己编译它,但在为 Python 3 编译时遇到了问题。

有人知道怎么安装吗?

最佳答案

首先您需要安装 python3 和开发头文件。

然后你需要告诉configure使用python3:

PYTHON=python3 ./configure

正常编译安装

make
make install

然后您应该能够使用 python3 中的 pygobject。

关于python - 如何安装支持 Python 3 的 PyGObject,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7065310/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com