Seite 1 von 1

matplotlib not found __WHY??

Verfasst: Freitag 11. November 2016, 20:26
von tklustig
Hi Community,
habe soeben mittels

Code: Alles auswählen

sudo apt-get install python-matplotlib python-matplotlib-doc ipython
alle für die mathematischen Berechnungen relevanten
Bibliotheken erfolgreich installiert.

Wenn ich jetzt aber folgenden Code eingebe

Code: Alles auswählen

import pylab as p 
x = p.arange(0,7,0.01)
y = p.sin(x) 
p.plot(x,y) 
p.show() 
meldet mit der Intepreter "no module named matplotlib"
Wie kann das sein, bzw. was muss ich tun?

Re: matplotlib not found __WHY??

Verfasst: Freitag 11. November 2016, 20:52
von snafu
Du musst darauf achten, dass die installierten Module zu deiner Interpreter-Version passen. Welche Python-Version nutzt du?

Re: matplotlib not found __WHY??

Verfasst: Freitag 11. November 2016, 23:12
von tklustig
Wahlweise Python 2.7 oder Python 3.5.1....bzw. folgende Angaben liefert Eric6:
Python 3.5.17/GNU Compiler 5.3.1

Re: matplotlib not found __WHY??

Verfasst: Freitag 11. November 2016, 23:32
von BlackJack
@tklustig: Die Paketnamen sehen nach Modulen/Packages für Python 2 aus. Schau mal nach so etwas wie `python3-matplotlib` und `ipython3`.

Re: matplotlib not found __WHY??

Verfasst: Samstag 12. November 2016, 00:36
von tklustig
Vielen Dank auch!!!
Dein Tipp war Gold wert.
Bin echt perplex, wie einfach schwierige nummerische Berechnungen in Python mittels dieser Bibliothek zu bewerkstelligen sind!
Von den Grafikoptionen ma' ganz abgesehen!
So long....