I'm trying to run a simple helloworld.py example for pygtk on Ubuntu 14, this is my Ubuntu version info:
This is my ubuntu version:
Distributor ID: Ubuntu
Description: Ubuntu 14.10
Release: 14.10
Codename: utopic
I have both Py2 and Py3 installed (Python2.7 and Python3.4), through Ubuntu package manager, but I want to run pygtk with python3.
Now I try to run the pygtk sample, and I get:
$ python3 helloworld.py
Traceback (most recent call last):
File "helloworld.py", line 2, in <module>
import pygtk
ImportError: No module named 'pygtk'
Ok, so pygtk module is missing, so I try to install it using pip:
$ sudo pip3 install pygtk
Collecting pygtk
Using cached pygtk-2.24.0.tar.bz2
********************************************************************
* Building PyGTK using distutils is only supported on windows. *
* To build PyGTK in a supported way, read the INSTALL file. *
********************************************************************
Complete output from command python setup.py egg_info:
********************************************************************
* Building PyGTK using distutils is only supported on windows. *
* To build PyGTK in a supported way, read the INSTALL file. *
********************************************************************
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-4xuy8p4h/pygtk
The confusing part is, the pygtk site tell me:
http://www.pygtk.org/downloads.html
PyGTK is included in most Linux distributions (including Debian, Fedora, Ubuntu, Opensuse, Gentoo, Mandrake, Redhat, SUSE...); the source code can also be downloaded and compiled from the links below.
Where and how is pygtk installed in my Ubuntu system, and what's the issue with all the errors I'm getting. Or is it that I need to build pygtk from source?
EDIT:
The other confusing part is the message about distutils; is pip part of distutils, so the message is telling me that pygtk cannot be installed using pip on systems other than Windows (probably it is and that's why the message is generated, but one can't be too sure), or is it that pip not part of distutils, in which case pip CAN be used to install pygtk?! (Why do I need to trace the history of packages and their name changes and which scripts/tools belong to which packages just to understard an error message!)