Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install PyGObject with Python 3 support

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.

Does anyone know how to install it?

like image 928
AJ00200 Avatar asked Aug 15 '11 13:08

AJ00200


People also ask

What is Python GObject?

Python Bindings for GLib/GObject/GIO/GTK+ PyGObject is a Python extension module that gives clean and consistent access to the entire GNOME software platform through the use of GObject Introspection.

What is python3 GI?

It is a part of Glib, the core library used to build GTK+ and GNOME. This package contains the Python 3 binding generator for libraries that support gobject-introspection, i. e. which ship a gir1. 2-<name>-<version> package. With these packages, the libraries can be used from Python 3. Version.


1 Answers

First you need to install python3 and the development headers.

Then you need to tell configure to use python3:

PYTHON=python3 ./configure

Compile and install normally

make
make install

You should then be able to use pygobject from python3.

like image 127
Johan Dahlin Avatar answered Oct 22 '22 15:10

Johan Dahlin