import pylab funktioniert nicht

Probleme bei der Installation?
Antworten
fkdjsdf
User
Beiträge: 3
Registriert: Donnerstag 17. April 2014, 08:59

Guten Tag,

ein Jahr habe ich Python nicht mehr verwendet.
Ich wollte wieder auf ein altes Skript "compounding.py", welches Pylab benötigt, zurückgreifen, aber leider läuft das nicht.

Das Python-Skript:
import pylab

principal = 26951.11
interestrate = 0.1316
years = 22

values = []
for i in range(years + 1):
values.append(principal)
principal += principal * interestrate
print principal
print i
pylab.plot(values)
pylab.show()

Der Output sieht folgendermassen aus:
%run "C:\Users\Paul\Weiterbildung\edX\6.00.1x Files\Pylab\compounding.py"
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
C:\Users\Paul\Weiterbildung\edX\6.00.1x Files\Pylab\compounding.py in <module>()
----> 1 import pylab
2
3 principal = 26951.11
4 interestrate = 0.1316
5 years = 22

C:\Users\Paul\AppData\Local\Enthought\Canopy\User\lib\site-packages\pylab.py in <module>()

C:\Users\Paul\AppData\Local\Enthought\Canopy\User\lib\site-packages\matplotlib\__init__.py in <module>()

C:\Users\Paul\AppData\Local\Enthought\Canopy\User\lib\site-packages\matplotlib\rcsetup.py in <module>()

C:\Users\Paul\AppData\Local\Enthought\Canopy\User\lib\site-packages\matplotlib\colors.py in <module>()

C:\Users\Paul\AppData\Local\Enthought\Canopy\User\lib\site-packages\numpy\__init__.py in <module>()

C:\Users\Paul\AppData\Local\Enthought\Canopy\User\lib\site-packages\numpy\add_newdocs.py in <module>()

C:\Users\Paul\AppData\Local\Enthought\Canopy\User\lib\site-packages\numpy\lib\__init__.py in <module>()

C:\Users\Paul\AppData\Local\Enthought\Canopy\User\lib\site-packages\numpy\lib\type_check.py in <module>()

C:\Users\Paul\AppData\Local\Enthought\Canopy\User\lib\site-packages\numpy\core\__init__.py in <module>()

ImportError: No module named multiarray


Mein Betriebssystem ist Windows 7, 64 bit. Ich weiss nicht, wie ich die Version oder Versionen von Python einfach aufrufe.
Python 2.7.6 | 64-bit | (default, Sep 15 2014, 17:36:35) [MSC v.1500 64 bit (AMD64)] on win32
IDLE ist glaube ich, bin mir nicht sicher, in 32 und 64 bit installiert.
Enthought Canopy ist Version 64 bit.
Unter Systemsteuerung\Programme\Programme und Funktionen kann ich Python und IDLE nicht finden.
Daher weiss ich nicht wie ich beispielsweise komplett alles deinstalliere und wieder neu mit z.B. 64 bit installiere.
Ich weiss nicht wie ich das Problem effizient und strukturiert löse.
Vielen Dank
Benutzeravatar
Sr4l
User
Beiträge: 1091
Registriert: Donnerstag 28. Dezember 2006, 20:02
Wohnort: Kassel
Kontaktdaten:

Du startest es nicht mit einem Standard Python sondern, dem Pfad nach, mit Enthought\Canopy das müsste auch was zum deinstallieren geben.

Aber eigentlich müsste es schon helfen Numpy neuzuinstallieren. Den das scheint das Paket "multiarray" haben zu wollen. Von dem ich übrigens noch nichts gehört habe.
BlackJack

@Sr4l: Ich hab so etwas auf meiner Platte: ``/usr/local/lib/python2.7/dist-packages/numpy/core/multiarray.so``

Das es in `numpy/core/` liegt lässt vermuten dass Numpy das Modul zwingend braucht. :-)
Antworten