安装包时,Python DLL加载失败

时间:2017-05-19 12:49:33

标签: python opencv numpy matplotlib

我试图运行python脚本但是我得到了消息

ImportError: DLL load failed: %1 is geen geldige Win32-toepassing.

完整错误:

    Traceback (most recent call last):
  File "ROC_plotting.py", line 2, in <module>
    import matplotlib.pyplot as plt
  File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 115, 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 six.moves import tkinter as Tk
  File "C:\Python27\lib\site-packages\six.py", line 203, in load_module
    mod = mod._resolve()
  File "C:\Python27\lib\site-packages\six.py", line 115, in _resolve
    return _import_module(self.mod)
  File "C:\Python27\lib\site-packages\six.py", line 82, 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 is geen geldige Win32-toepassing.

似乎有些错误与Matplotlib有关,但是当我运行时

pip list

似乎我确实安装了matplotlib

点子列表输出:

cycler (0.10.0)
functools32 (3.2.3.post2)
matplotlib (2.0.2)
numpy (1.11.3+mkl)
opencv-python (2.4.13.2)
pip (9.0.1)
pyparsing (2.2.0)
python-dateutil (2.6.0)
pytz (2017.2)
scikit-learn (0.18.1)
setuptools (28.8.0)
six (1.10.0)
wheel (0.29.0)

我的python版本是2.7.13,我在64位Windows系统上运行。

1 个答案:

答案 0 :(得分:0)

如果它不是您的python版本,请确保安装了Microsoft Visual C ++ 2008 64位,因为matplotlib在控制面板&gt;中使用了它。程序