I am trying to learn GTK+3 as per this site: https://python-gtk-3-tutorial.readthedocs.org/en/latest/install.html. From the page:

1.1. Dependencies

  • GTK+3
  • Python 2 (2.6 or later) or Python 3 (3.1 or later)
  • gobject-introspection

The easiest way to install PyGObject from source is using JHBuild. It is designed to easily build source packages and discover what dependencies need to be build and in what order. To setup JHBuild, please follow the JHBuild manual.

I followed the manual as per that link and downloaded via git JHBuild (as they say to do) and built it with make/make install. That went fine. The next step is where the problem begins.

I ran the next command I was supposed to as per the page:

2.3. Build Prerequisites

Before any modules can be built, it is necessary to have certain build tools installed. Common build tools include the GNU Autotools (autoconf, automake, libtool and gettext), The GNU Toolchain (binutils, gcc, g++), make, pkg-config and Python, depending on which modules will be built.

JHBuild can check the tools are installed using the sanitycheck command:

$ jhbuild sanitycheck

When I first ran this I got this:

nate@excelion-Satellite-A105:~$ jhbuild sanitcheck
jhbuild: install prefix (/opt/gnome) can not be created

so I began looking around for help. I looked at this question: jhbuild sanitycheck not moving, but it just told the obvious. Nonetheless, I ran the following commands and got the results below:

nate@excelion-Satellite-A105:~$ sudo chmod 777 /opt/gnome/ -R
[sudo] password for nate: 
chmod: cannot access ‘/opt/gnome/’: No such file or directory
nate@excelion-Satellite-A105:~$ mkdir /opt/gnome
mkdir: cannot create directory ‘/opt/gnome’: Permission denied
nate@excelion-Satellite-A105:~$ sudo mkdir /opt/gnome
nate@excelion-Satellite-A105:~$ jhbuild sanitcheck
jhbuild: working directory (/opt/gnome/_jhbuild) can not be created
nate@excelion-Satellite-A105:~$ jhbuild sanitycheck
jhbuild: working directory (/opt/gnome/_jhbuild) can not be created
nate@excelion-Satellite-A105:~$ chmod 777 /opt/gnome/ -R
chmod: changing permissions of ‘/opt/gnome/’: Operation not permitted
nate@excelion-Satellite-A105:~$ sudo chmod 777 /opt/gnome/ -R
nate@excelion-Satellite-A105:~$ jhbuild sanitycheck
checkout root (/home/nate/checkout/gnome) is not writable
Could not find the Perl module XML::Parser
cvs not found
svn not found
flex not found
bison not found

This is really annoying as I want to learn how to make GUIs with Python and this appears to be the best current option (BTW...if anyone has any input on that feel fine to comment)

Does anyone know what the problem is with the installation?

Thanks!

  • 2
    Unless you want the latest version of GTK and friends, all of this is not needed. GTK is packaged and even installed by default on Ubuntu. – Timo Dec 21 '13 at 11:25
up vote 0 down vote accepted

I just read over the instructions again and realized that I have to install those packages listed as not found.

I will mark this as answer as soon as possible.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.