How to compile pygtk from source for python2.6 on ubuntu 12.04

I have an application that is stuck on python2.6. I cannot port it to python2.7 due to specific and complex extensions.

The problem is that 12.04 removes pygtk for python2.6, since python2.7 becomes the default python version.

I need to create pygtk for python2.6 from source. I followed the reading, but I am doing something wrong. (the document is quite short)

The line looks fine, since I can import gtk if I'm in a folder with an unpacked archive (I do python -c 'import gtk'). But make install is not working properly.

AFAICT, I exported the variables PYTHON and PYTHONPATH to the correct path.

PYTHONPATH=/usr/lib/python2.6/dist-packages
PYTHON=/usr/bin/python2.6

Any idea what is wrong with this config?

+3
2

, , , . , .

$ sudo su
# pip install pygtk

, : " PyGTK , INSTALL". , :

# cd build/pygtk
# chmod 755 configure
# PYTHON=/usr/bin/python2.6 ./configure --prefix=/usr

Python, GLIB. : " , GLIB ". config.log, , " : glib.h: ". , , , GLIB.

# apt-get install libglib2.0-dev
# PYTHON=/usr/bin/python2.6 ./configure --prefix=/usr

! : " " pygobject-2.0 "found". python-gobject-dev.

# apt-get install python-gobject-dev
# PYTHON=/usr/bin/python2.6 ./configure --prefix=/usr

, make make install. , "/bin/bash: 16:../py-compile: Permission denied". root. configure script " PYCAIRO... no", , " gtk - pycairo". .

# apt-get install python-cairo-dev
# PYTHON=/usr/bin/python2.6 ./configure --prefix=/usr

pycairo, , GTK.

# apt-get install python-gtk2-dev
# PYTHON=/usr/bin/python2.6 ./configure --prefix=/usr

, LIBGLADE .

# apt-get install libglade2-dev
# PYTHON=/usr/bin/python2.6 ./configure --prefix=/usr

, , : " Numpy: ".

# make
# make install

, : "/bin/ bash: 16:../py-compile: Permission denied".

.

+2

easy_install 2.6, , ubuntu 2.6 2.7. easy_install ( 2.7) easy_install-2.6 2.6.

+1

All Articles