wxpython unter ubuntu 10.04 installieren

Plattformunabhängige GUIs mit wxWidgets.
Antworten
joh#
User
Beiträge: 139
Registriert: Freitag 6. November 2009, 13:16

Hallo,

wo gibts dafür ein Binär packet? Weil ich mit dem selber bauen keine Glück habe:

Code: Alles auswählen

python2.6 build-wxpython.py --build_dir=../bld:

checking for pkg-config... /usr/bin/pkg-config
checking for GTK+ - version >= 2.4.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 running configure
ERROR: failed building wxWidgets
Traceback (most recent call last):
  File "build-wxpython.py", line 329, in <module>
    wxbuild.main(wxscript, build_options)
  File "/home/joh/wxpython/wxPython-src-2.9.1.1/build/tools/build-wxwidgets.py", line 270, in main
    "Error running configure")
  File "/home/joh/wxpython/wxPython-src-2.9.1.1/build/tools/build-wxwidgets.py", line 35, in exitIfError
    raise builder.BuildError, msg
BuildError

offenbar war vorher noch die glib-2.0 zu bauen, das ging aber auch schief:

Code: Alles auswählen

./configure:
checking for glib-2.0 >= 2.4.0    atk >= 1.0.1    pango >= 1.4.0... Package glib-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `glib-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'glib-2.0' found Package atk was not found in the pkg-config search path. Perhaps you should add the directory containing `atk.pc' to the PKG_CONFIG_PATH environment variable No package 'atk' found Package pango was not found in the pkg-config search path. Perhaps you should add the directory containing `pango.pc' to the PKG_CONFIG_PATH environment variable No package 'pango' found
configure: error: Library requirements (glib-2.0 >= 2.4.0    atk >= 1.0.1    pango >= 1.4.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
Gruß
joh
Benutzeravatar
cofi
Python-Forum Veteran
Beiträge: 4432
Registriert: Sonntag 30. März 2008, 04:16
Wohnort: RGFybXN0YWR0

Ist denn das Dev-Paket von Gtk2 installiert? Fuer den Fall, dass es dieselben sind wie unter Debian ist das `libgtk2.0-dev`.

Das wxpython Paket heisst unter Debian `python-wxgtk2.8`.
joh#
User
Beiträge: 139
Registriert: Freitag 6. November 2009, 13:16

cofi hat geschrieben: Das wxpython Paket heisst unter Debian `python-wxgtk2.8`.
ups.... da ist bei mir wx schon installiert, da war der ganze Aufriss umsonst.
*freu* jetzt geht's

Gruß
joh
Leonidas
Python-Forum Veteran
Beiträge: 16025
Registriert: Freitag 20. Juni 2003, 16:30
Kontaktdaten:

Aber warum nimmst du nicht das wxPython das Ubuntu bereits mitbringt? In der Regel ist es keine gute Idee, Pakete am Paketsystem vorbeizuinstallieren…
My god, it's full of CARs! | Leonidasvoice vs (former) Modvoice
BlackJack

@Leonidas: Das hat er doch jetzt getan. Beziehungsweise wusste er nicht, dass es schon längst installiert war.
Leonidas
Python-Forum Veteran
Beiträge: 16025
Registriert: Freitag 20. Juni 2003, 16:30
Kontaktdaten:

Oh, entschuldige, hab den letzten Post irgendwie auf wx-dev und nicht wx an sich bezogen :oops:
My god, it's full of CARs! | Leonidasvoice vs (former) Modvoice
joh#
User
Beiträge: 139
Registriert: Freitag 6. November 2009, 13:16

ja, genau so, im Moment alles Friede/Freude/Eierkuchen :)

Besten Dank
joh
serendip82
User
Beiträge: 8
Registriert: Mittwoch 21. August 2013, 16:27

Warum ist das nicht unter Fedora installiert?

Und überhaupt, warum ist das nicht in den repositories? Immer dieser Ärger mit Linux!

Wie istalliert man das denn?
Hab auf http://springdale.math.ias.edu/data/pui ... /6/x86_64/
ein repo gefunden, was allerdings nichts bringt, da die Abhängigkeiten nicht gelöst werden...

manno!
serendip82
User
Beiträge: 8
Registriert: Mittwoch 21. August 2013, 16:27

Ich korrigiere mich, es ist im repo, funktioniert nur leider trotzdem nicht :-(

in der matplotlibrc:
backend : WXAgg # the default backend

wxpython ist istalliert, doch wenn ich es pylab importiere kommt:

In [3]: import pylab
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-3-0c66bb86b884> in <module>()
----> 1 import pylab

/usr/lib64/python2.7/site-packages/pylab.py in <module>()
----> 1 from matplotlib.pylab import *
2 import matplotlib.pylab
3 __doc__ = matplotlib.pylab.__doc__

/usr/lib64/python2.7/site-packages/matplotlib/pylab.py in <module>()
263 from numpy.linalg import *
264
--> 265 from matplotlib.pyplot import *
266
267 # provide the recommended module abbrevs in the pylab namespace

/usr/lib64/python2.7/site-packages/matplotlib/pyplot.py in <module>()
95
96 from matplotlib.backends import pylab_setup
---> 97 _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
98
99 @docstring.copy_dedent(Artist.findobj)

/usr/lib64/python2.7/site-packages/matplotlib/backends/__init__.pyc in pylab_setup()
23 backend_name = 'matplotlib.backends.%s'%backend_name.lower()
24 backend_mod = __import__(backend_name,
---> 25 globals(),locals(),[backend_name])
26
27 # Things we pull in from all backends

ImportError: No module named backend_wxagg


Was könnte denn da falsch sein?
BlackJack

@serendip82: Offenbar ist bei `matplotlib` das Backend nicht installiert.

Schau mal hier https://apps.fedoraproject.org/packages/s/matplotlib — offenbar sind die Backends in eigenen Packages.
serendip82
User
Beiträge: 8
Registriert: Mittwoch 21. August 2013, 16:27

Danke,

das hat funktioniert!
Antworten