简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM