RuntimeError bei Basemap Toolkit Import

Probleme bei der Installation?
Antworten
steppn
User
Beiträge: 3
Registriert: Mittwoch 11. Juli 2012, 15:35

Hallo,

ich habe das toolkit Basemap (1.0.4) über YaST (Suse 12.1) installiert, bekomme aber, wenn ich es in Python (2.7.2) importieren möchte, folgenden Felher:

Code: Alles auswählen

>>> from mpl_toolkits.basemap import Basemap 
RuntimeError: module compiled against API version 7 but this version of numpy is 6
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/mpl_toolkits/basemap/__init__.py", line 26, in <module>
    from matplotlib.collections import LineCollection
  File "/usr/lib64/python2.7/site-packages/matplotlib/collections.py", line 23, in <module>
    import matplotlib.backend_bases as backend_bases
  File "/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.py", line 37, in <module>
    import matplotlib.widgets as widgets
  File "/usr/lib64/python2.7/site-packages/matplotlib/widgets.py", line 17, in <module>
    from lines import Line2D
  File "/usr/lib64/python2.7/site-packages/matplotlib/lines.py", line 23, in <module>
    from matplotlib.font_manager import FontProperties
  File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 53, in <module>
    from matplotlib import ft2font
ImportError: numpy.core.multiarray failed to import
Habe auch schon eine Installation per Hand versucht wie auf http://matplotlib.github.com/basemap/us ... lling.html beschrieben. Aber auch da gabs den gleichen Fehler.

Was ist das Problem?

Bin dankbar für alle Hinweise!
Zuletzt geändert von Anonymous am Freitag 13. Juli 2012, 10:18, insgesamt 1-mal geändert.
Grund: Code-Tags hinzugefügt
Leonidas
Python-Forum Veteran
Beiträge: 16025
Registriert: Freitag 20. Juni 2003, 16:30
Kontaktdaten:

Hast du numpy installiert?
My god, it's full of CARs! | Leonidasvoice vs (former) Modvoice
BlackJack

Vor allem ist die Frage welches/wie `numpy` installiert wurde:

RuntimeError: module compiled against API version 7 but this version of numpy is 6
steppn
User
Beiträge: 3
Registriert: Mittwoch 11. Juli 2012, 15:35

Habe die Version numpy-1.6.2-py2.7-linux-x86_64
Ursprünglich hab ichs über YaST installiert, dann aber, wenn ich mich recht erinnere, nochmal mit easy_install -U numpy aktualisiert.
BlackJack

@steppn: Dann passt anscheinend das Basemap aus der Paketverwaltung nicht zum händisch installierten Numpy.
steppn
User
Beiträge: 3
Registriert: Mittwoch 11. Juli 2012, 15:35

Ja es waren wohl nicht zusammen passende repositories.

Ich war so klug, mal ein wegschmeißen von ganz Python zu versuchen.
Jetzt hab ich ein schönes neues Ubuntu :)
Und die Installation über synaptics hat jetzt funktioniert.
Antworten