• Apfeltalk ändert einen Teil seiner Allgemeinen Geschäftsbedingungen (AGB), das Löschen von Useraccounts betreffend.
    Näheres könnt Ihr hier nachlesen: AGB-Änderung
  • Viele hassen ihn, manche schwören auf ihn, wir aber möchten unbedingt sehen, welche Bilder Ihr vor Eurem geistigen Auge bzw. vor der Linse Eures iPhone oder iPad sehen könnt, wenn Ihr dieses Wort hört oder lest. Macht mit und beteiligt Euch an unserem Frühjahrsputz ---> Klick

Probleme mit Python matplotlib

spross

Gast
Hallo Zusammen

Ich möchte gerne matplotlib verwenden um mit Python Matrizen etc. zu zeichnen. Die erste Hürde war mal, matplotlib überhaupt für MacOS X zu finden. Auf der ofiziellen Seite verweisen sie auf die fertigen Packages unter:

http://pythonmac.org/packages/py24-fat/index.html

Somit habe ich als erstes Python 2.4 mit dem dortigen Package installiert. Läuft super. Wenn ich jetzt python im Terminal tippe, kommt direkt 2.4.

Danach habe ich das matplotlib Package runtergeladen und installiert. Danach fand er in Python auch 'import matplotlib'. Soweit so gut.

Danach ging ich auf die Tutorialseite von matplotlib und sah dort, dass die aber was mit 'import pylab' machen. Was wiederum bei mir nicht funktionierte. Also ging ich nochmals auf die Packagesseite und ladete dort noch numpy runter (kam mir bekannt vor in diesem mathe plot zusammenhang). Und man staune, danach konnte er mit 'import pylab' was anfangen, ABER:

Code:
>>> import pylab
RuntimeError: module compiled against version 1000009 of C-API but this version of numpy is 1000002

The import of the numpy version of the _transforms module,
_ns_transforms, failed.  This is is either because numpy was
unavailable when matplotlib was compiled, because a dependency of
_ns_transforms could not be satisfied, or because the build flag for
this module was turned off in setup.py.  If it appears that
_ns_transforms was not built, make sure you have a working copy of
numpy and then re-install matplotlib. Otherwise, the following
traceback gives more details:

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/pylab.py", line 1, in ?
    from matplotlib.pylab import *
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/pylab.py", line 201, in ?
    from axes import Axes, PolarAxes
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axes.py", line 14, in ?
    from artist import Artist, setp
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/artist.py", line 4, in ?
    from transforms import identity_transform
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/transforms.py", line 223, in ?
    from _transforms import Value, Point, Interval, Bbox, Affine
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/_transforms.py", line 17, in ?
    from matplotlib._ns_transforms import *
ImportError: numpy.core.multiarray failed to import
Laut der Fehlermeldung stimmte also was mit der Reihenfolge der Installtion der Packages nicht. Konnte ich nicht widersprechen. Also habe ich alles nochmals installiert, und diesmal sogar zuallererst noch das numarray Package. Also folgende Reihenfolge:

1. numarray
2. numpy
3. matplotlib

Aber leider kommt wieder genau die selbe Fehlermeldung. Und zugriff auf die setup.cfg's habe ich ja dank den Packages nicht. Und über die Sourcedateien ist es nicht gerade einfacher, bzw. soweit war ich noch nie...

Kann mir da irgend ein Profi helfen?
Vielen Dank!

Gruss Spross
 
Zuletzt bearbeitet von einem Moderator: