如何在Python 3支持下安装PyGObject [英] How to install PyGObject with Python 3 support

查看:118
本文介绍了如何在Python 3支持下安装PyGObject的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用多种方法来安装PyGObject.首先,使用 apt-get ,但这仅适用于Python2.x.接下来,我尝试自己编译它,但是在将其编译为Python 3时遇到了问题.

I've been trying to install PyGObject using a variety of methods. First, using apt-get but that only installs it for Python 2.x. Next I attempted to compile it myself but I have been having problems getting it to compile for Python 3.

有人知道如何安装吗?

推荐答案

首先,您需要安装python3和开发标头.

First you need to install python3 and the development headers.

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

Then you need to tell configure to use python3:

PYTHON=python3 ./configure

编译并正常安装

make
make install

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

You should then be able to use pygobject from python3.

这篇关于如何在Python 3支持下安装PyGObject的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆