我似乎无法让 MatPlotLib 工作。我下载并安装了正确的版本(matplotlib-1.1.0.win32-py2.7.exe),并且我已经安装了 numpy 和 scipy(它们可以正常工作)。
这是我得到的错误:
C:\python code>python
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib.pyplot as plt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 95, in <module>
new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "C:\Python27\lib\site-packages\matplotlib\backends\__init__.py", line 25,
in pylab_setup
globals(),locals(),[backend_name])
File "C:\Python27\lib\site-packages\matplotlib\backends\backend_tkagg.py", lin
e 8, in <module>
import Tkinter as Tk, FileDialog
File "C:\Python27\lib\lib-tk\Tkinter.py", line 38, in <module>
import FixTk
File "C:\Python27\lib\lib-tk\FixTk.py", line 65, in <module>
import _tkinter
ImportError: DLL load failed: %1 is not a valid Win32 application.
>>>
有任何想法吗?