由于32位导致Python导入失败

时间:2016-09-08 12:21:57

标签: python python-2.7

我已经安装了64位Python环境(从控制台验证它是64位):

Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)] on win32

我得到的错误是在调用行

import matplotlib.pyplot as plt

,错误是

ImportError: DLL load failed: %1 is no valid Win32-application.

现在我安装的matploblib来自一个名为matplotlib-1.5.2-cp27-cp27m-win_amd64.whl的文件,应该是该库的64位版本。我怎样才能缩小这里发生的事情?

我从http://www.lfd.uci.edu/~gohlke/pythonlibs/

下载了whl

编辑:整个错误消息

    import matplotlib.pyplot as plt
  File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 114, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()

  File "C:\Python27\lib\site-packages\matplotlib\backends\__init__.py", line 32, in pylab_setup
    globals(),locals(),[backend_name],0)
  File "C:\Python27\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 6, in <module>
    from matplotlib.externals.six.moves import tkinter as Tk
  File "C:\Python27\lib\site-packages\matplotlib\externals\six.py", line 199, in load_module
    mod = mod._resolve()
  File "C:\Python27\lib\site-packages\matplotlib\externals\six.py", line 113, in
 _resolve
    return _import_module(self.mod)
  File "C:\Python27\lib\site-packages\matplotlib\externals\six.py", line 80, in
_import_module
    __import__(name)
  File "C:\Python27\lib\lib-tk\Tkinter.py", line 38, in <module>
    import FixTk
  File "C:\Python27\lib\lib-tk\FixTk.py", line 68, in <module>
    import _tkinter
ImportError: DLL load failed: %1 ist keine zulõssige Win32-Anwendung.

0 个答案:

没有答案