Hello,
I’ve installed the following Python packages on a Windows XP machine:
Python 2.6.5
Python 2.6 numpy-1.4.1
Python 2.6 matplotlib-0.99.3 [installer - matplotlib-0.99.3.win32-py2.6]
Python and Numpy work correctly. Matplotlib also works and as a test I tried successfully the following on the python interpretor:
from matplotlib.pyplot import *
plot([1,2,3])
show()
A graph then appears and thus so far so good.
However, when I try to run a certain python script, a problem occurs when importing from matplotlib:
Traceback (most recent
call last):
File
“C:\Pythoncode\Games\Bridge_war_2\unitload2.py”, line 2, in
from matplotlib.pyplot
import plot, ylabel,xlabel, show
File
“C:\Python26\lib\site-packages\matplotlib\pyplot.py”, line
78, in
new_figure_manager,
draw_if_interactive, show = pylab_setup()
File
“C:\Python26\lib\site-packages\matplotlib\backends_init_.py”,
line 25, in pylab_setup
globals(),locals(),[backend_name])
File
“C:\Python26\lib\site-packages\matplotlib\backends\backend_tkagg.py”,
line 7, in
import Tkinter as Tk,
FileDialog
File
“C:\Python26\lib\lib-tk\FileDialog.py”, line 12, in
from Dialog import
Dialog
File
“C:\Pythoncode\Games\Bridge_war_2\Dialog.py”, line 2, in
import wx
ImportError: No module
named wx
And then no graph appears.
The same script works fine on my Linux computers. On the unitload2.py script, the following is imported:
from numpy import array, append, …
from numpy.linalg import solve
No further modules are imported. Once I’ve ran the unitload2.py script, that session of the python interpretor produces the same error when I try a test plot again.
Regards
Alex