Seite 1 von 1

Networkx - matplotlib - dateutil

Verfasst: Mittwoch 23. Juni 2010, 17:27
von Auctor
Hallo Zusammen,

ich habe ein Problem mit matplotlib.
Mein System: MacBook Air, Mac OS X 10.6.4, python 2.6.5, networkx 1.1, matplotlib 99.3

Wenn ich versuche mit

Code: Alles auswählen

import networkx as nx
import matplotlib.pyplot as plt
.
.
. #some code

plt.draw(g)
einen graphen zu plotten bekomme ich diese Fehlermeldung:
ImportError: No module named dateutil.rrule

module body in pyplot.py at line 6
from matplotlib.figure import Figure, figaspect
module body in figure.py at line 18
from axes import Axes, SubplotBase, subplot_class_factory
module body in axes.py at line 17
import matplotlib.dates as mdates
module body in dates.py at line 112
from dateutil.rrule import rrule, MO, TU, WE, TH, FR, SA, SU, YEARLY, \
meine Versuche dateutil zu installieren schlugen alle fehl.
Traceback (most recent call last):
File "setup.py", line 7, in <module>
from setuptools import setup
ImportError: No module named setuptools
dabei funktioniert aber das setuptool bei allen anderen modulen ohne probleme. Ich habe sowohl die 1.4.1 als auch 1.5 von dateutil versucht. Über porticus kann ich dateutil installieren. Aber auch hier bekomme ich bei import dateutil ein
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named dateutil
Hat vielleicht jemand eine Idee?

Vielen Dank für eure Hilfe.

Martin

Re: Networkx - matplotlib - dateutil

Verfasst: Mittwoch 23. Juni 2010, 18:25
von ms4py
Versuch am besten den setuptools Ersatz `distribute` (http://pypi.python.org/pypi/distribute). Setuptools ist ziemlich buggy, auf jeden Fall unter Windows und wird auch nicht mehr weiter entwickelt.

BTW: Nur weil du über `setup.py install` Pakete installierst, heißt das nicht, dass du `setuptools` bereits installiert hast. ;-) Das ist schon das eigentliche Problem.

Re: Networkx - matplotlib - dateutil

Verfasst: Mittwoch 23. Juni 2010, 22:11
von Auctor
Hallo ms4py,

yeah! das wars.. vielen dank! :) der tipp mit distribute is wirklich gut. Und nun funzt alles. :) Mal schaun wie weit ich diesmal komm bis ich wieder feststeck. :)

Vielen Dank nochmal.

Gruß

Martin