I am having difficulties trying to get an interactive program working with wxPython. Previously, I was successful with a Tcl/Tk interface, but I thought it would be good to 'modernize' with wxPython.
1) Using google I found out the preferred method for connecting an interactive program to a wxPython GUI is to use wx.GUIEventLoop
but after some time I found this is not available in wxPython 2.8
2) next, I download from github and tried building with the results:
sudo python2.7 build-wxpython.py --build_dir=../bld --install
with the error message
Can't find or import /home/martin/programming/build/tools/build-wxwidgets.py, exiting.
I don't have any ideas how to resolve this error
3) next, I download the source ball wxPython-src-3.0.0.0.tar.bz2 uncompressed it
and tried to compile:
python2.7 build-wxpython.py --build_dir=../bld
It ran for awhlle but failed with:
checking for GTK+ version…
checking for pkg-config… /usr/bin/pkg-config
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) /usr/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/martin/Dropbox/Programming/Python/wxPython-src-3.0.0.0/build/tools/build-wxwidgets.py”, line 364, in main
“Error running configure”)
File “/home/martin/Dropbox/Programming/Python/wxPython-src-3.0.0.0/build/tools/build-wxwidgets.py”, line 80, in exitIfError
raise builder.BuildError(msg)
BuildError
but I have gtk installed:
> ai libgtk-3-bin
Reading package lists... Done
Building dependency tree Reading state information... Done
libgtk-3-bin is already the newest version.
The following package was automatically installed and is no longer required:
openjdk-7-jre-lib
Use 'apt-get autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 43 not upgraded.
>
In addition, I can not find any repositories for aclocal which is not
included in Ubuntu.
Summary: upgrading to a version that can use wx.GUIEventLoop() in Ubuntu 13.10 is
difficult; I am worried that even if I am eventually successful, it will
still be difficult for others to use the program as they will also need to upgrade; any suggestions? Would it be better if I gave up on wxPython and started over with PyQt? Any suggestions are appreciated. Thanks.
Bit_Pusher