无法将图形嵌入到tkinter中

时间:2017-09-28 09:54:30

标签: python debugging matplotlib tkinter module

我正在尝试将图形嵌入到tkinter窗口中。导入代码如下所示:

Traceback (most recent call last):
  File "C:/Users/Álvaro/Desktop/Mates/codi/matplotlib.practica/insertar_graf_tkinter.py", line 5, in <module>
    from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg
  File "C:\Users\Álvaro\AppData\Local\Programs\Python\Python35\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 13, in <module>
    import matplotlib.backends.tkagg as tkagg
  File "C:\Users\Álvaro\AppData\Local\Programs\Python\Python35\lib\site-packages\matplotlib\backends\tkagg.py", line 9, in <module>
    from matplotlib.backends import _tkagg
ImportError: DLL load failed:  The specified module could not be found.

这是我得到的错误:

-Xms128m
-Xmx2048m
-XX:MaxPermSize=350m
-XX:ReservedCodeCacheSize=240m
-XX:+UseCodeCacheFlushing
-XX:+UseCompressedOops

我在Windows 8上使用Python 3.5.1.patplotlib模块是通过pip安装的。

1 个答案:

答案 0 :(得分:0)

我做了@Volodia给this问题的第二个答案说得很好。问题解决了。