0
votes
    >>> 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 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 not a valid Win32 application.

Hi guys, I am facing issue when I want import matplotlib.pyplot as plt. However I had successfully installed the matplotlib by using pip install matplotlib and I am able to import matplotlib but unable to import matplotlib.pyplot Do you guys have any ideas? Doyou

1
I think this youtube video is exactly what you are looking for youtube.com/watch?v=fGuHMVAruAE - alec_djinn
Currently I am using window 10 64 bit. However I had install python 32 bit , which mean I need to install a python 64bit ? - JunXiang
I would try that, yes. - alec_djinn
I had installed 64bit python,but I couldn't find easy setup tool for installing pandas and matplotlib. - JunXiang
I got the solution already !! - JunXiang

1 Answers

0
votes
  1. Install 64-bit Python 2.
  2. From cmd prompt run pip install matplotlib