[Tutor] What is wrong with my Python program that causes it to run but not give results?
Ed Troy
etroy at aeroconsult.com
Tue Oct 25 15:24:47 EDT 2016
I found a very useful Python program for calculating the Spice
parameters for a LED. I have Python3 and the various modules loaded onto
my Ubuntu machine. I created the diode IV curve data as per the article,
but I can't seem to get it to run. My python filename is
LED_model_utf8.py The text file with the LED IV data is LED_IV.txt.
When I type python LED_model_utf8.py LED_IV.txt, I get an error message:
edward at ubuntu:~$ python LED_model_utf8.py LED_IV.txt
Traceback (most recent call last):
File "LED_model_utf8.py", line 4, in <module>
import matplotlib.pyplot as plt
ImportError: No module named matplotlib.pyplot
If I type python3 LED_model_utf8.py LED_IV.txt, there is a pause and
then I am back to the $ prompt. So, it seems like the program is
running, but I am not getting any results like graphs and Spice
parameters. Clearly, something is wrong, although the program "seems" to
run correctly without errors. It just does not "do" anything.
The page that contains the file and a description of how it works is:
https://leicesterraspberrypi.wordpress.com/projects/modelling-a-diode-for-use-in-spice-simulations/
I can attach or list out my python file and the data file if needed.
Ed
More information about the Tutor
mailing list