I use Ubuntu 14.04 and I’ve sucessfully installed the wxPython in Python 2.7.6 just by installing wxGlade. However, I would like to install wxPython in Sagemath, that has a Python interpreter inside it. I installed some packages that I thought would be necessary to build wxPython from source and tried to build and install it in the internal Python 2.7.8 interpreter of Sagemath. So I downloaded wxPython-src-3.0.1.1, extracted, entered the folder that contained the build-wxpython.py script and made:
joao@Hades:wxPython$ sage --python build-wxpython.py --install --build_dir=…/bld
which failed at:
…
checking for GTK+ - version >= 2.6.0… no
*** Could not run GTK+ test program, checking why…
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occurred. This usually means GTK+ is incorrectly installed.
checking for pkg-config… (cached) /opt/sage-6.3-i686-Linux/local/bin/pkg-config
checking for GTK+ - version >= 3.0.0… no
*** Could not run GTK+ test program, checking why…
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK+ is incorrectly installed.
checking for gtk-config… no
checking for GTK - version >= 1.2.7… no
*** The gtk-config script installed by GTK could not be found
*** If GTK was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the GTK_CONFIG environment variable to the
*** full path to gtk-config.
checking for gtk-config… (cached) no
checking for GTK - version >= 1.2.3… no
*** The gtk-config script installed by GTK could not be found
*** If GTK was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the GTK_CONFIG environment variable to the
*** full path to gtk-config.
configure: error:
The development files for GTK+ were not found. For GTK+ 2, please
ensure that pkg-config is in the path and that gtk±2.0.pc is
installed. For GTK+ 1.2 please check that gtk-config is in the path,
and that the version is 1.2.3 or above. Also check that the
libraries returned by ‘pkg-config gtk±2.0 --libs’ or ‘gtk-config
–libs’ are in the LD_LIBRARY_PATH or equivalent.
Error running configure
ERROR: failed building wxWidgets
Traceback (most recent call last):
File “build-wxpython.py”, line 378, in
wxbuild.main(wxscript, build_options)
File “/home/joao/Downloads/wxPython-src-3.0.1.1/build/tools/build-wxwidgets.py”, line 364, in main
“Error running configure”)
File “/home/joao/Downloads/wxPython-src-3.0.1.1/build/tools/build-wxwidgets.py”, line 80, in exitIfError
raise builder.BuildError(msg)
BuildError
I also tried to install Sagemath wxPython-2.8.7.1.spkg experimental package, by doing: sage -i wxPython
But it failled at the same point:
…
checking for GTK+ - version >= 2.0.0… no
*** Could not run GTK+ test program, checking why…
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK+ is incorrectly installed.
configure: error:
The development files for GTK+ were not found. For GTK+ 2, please
ensure that pkg-config is in the path and that gtk±2.0.pc is
installed. For GTK+ 1.2 please check that gtk-config is in the path,
and that the version is 1.2.3 or above. Also check that the
libraries returned by ‘pkg-config gtk±2.0 --libs’ or ‘gtk-config
–libs’ are in the LD_LIBRARY_PATH or equivalent.
Error configure wx widgets.
real 0m17.868s
user 0m5.780s
sys 0m2.412s
···
Error installing package wxPython-2.8.7.1
Please email sage-devel (http://groups.google.com/group/sage-devel)
explaining the problem and including the relevant part of the log file
/opt/sage-6.3-i686-Linux/logs/pkgs/wxPython-2.8.7.1.log
Describe your computer, operating system, etc.
If you want to try to fix the problem yourself, don’t just cd to
/opt/sage-6.3-i686-Linux/local/var/tmp/sage/build/wxPython-2.8.7.1 and type ‘make’ or whatever is appropriate.
Instead, the following commands setup all environment variables
correctly and load a subshell for you to debug the error:
(cd ‘/opt/sage-6.3-i686-Linux/local/var/tmp/sage/build/wxPython-2.8.7.1’ && ‘/opt/sage-6.3-i686-Linux/sage’ --sh)
When you are done debugging, you can type “exit” to leave the subshell.
It seems that something is missing and needs to be installed, although I’ve already installed a lot of packages, including libgtk2.0-0, libgtk2.0-dev, libgtk-3-0, libgtk-3-dev.
Does someone knows what’s the problem here?
Thanks!