import pyplot,RuntimeError:无法dlopen tkinter模块文件

时间:2016-08-30 01:23:09

标签: python matplotlib pyenv

我使用pypy在Windows bash中安装pyplot,然后使用pip安装matplotlib,但在导入RunTimeError时,我得到了In [1]: import matplotlib.pyplot as plt --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) <ipython-input-1-eff513f636fd> in <module>() ----> 1 import matplotlib.pyplot as plt /home/zjshao/.pyenv/versions/pypy-5.3.1/site-packages/matplotlib/pyplot.pyc in <module>() 112 113 from matplotlib.backends import pylab_setup --> 114 _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup() 115 116 _IP_REGISTERED = None /home/zjshao/.pyenv/versions/pypy-5.3.1/site-packages/matplotlib/backends/__init__.pyc in pylab_setup() 30 # imports. 0 means only perform absolute imports. 31 backend_mod = __import__(backend_name, ---> 32 globals(),locals(),[backend_name],0) 33 34 # Things we pull in from all backends /home/zjshao/.pyenv/versions/pypy-5.3.1/site-packages/matplotlib/backends/backend_tkagg.pyc in <module>() 11 12 # Paint image to Tk photo blitter extension ---> 13 import matplotlib.backends.tkagg as tkagg 14 15 from matplotlib.backends.backend_agg import FigureCanvasAgg /home/zjshao/.pyenv/versions/pypy-5.3.1/site-packages/matplotlib/backends/tkagg.pyc in <module>() 7 import numpy as np 8 ----> 9 from matplotlib.backends import _tkagg 10 11 def blit(photoimage, aggimage, bbox=None, colormode=1): RuntimeError: Cannot dlopen tkinter module file In [2]:

exec dbms_xdb.sethttpport(9090);

那么问题是什么,以及如何解决这个问题呢?

任何建议将不胜感激!

1 个答案:

答案 0 :(得分:0)

你的python安装可能有问题。最好的方法是删除python并重新安装。

我建议您从Anaconda安装python。它是下一次点击&#39;安装程序(awesome for windows)设置python路径环境变量,并预先安装有用的包,包括&#39; mathplotlib&#39;。