I get the following error when trying to import Tkinter
:
>>> import Tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
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.
I have a windows 64 bit with python 64 bit.
I came across this when trying to use matplotlib.
import matplotlib
is working but import matplotlib.pyplot
fails with the same error as above.
I have tried installing matplotlib from https://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib also.
And I have installed Tkinter from there too tkinter3000-1.1.1-cp27-cp27m-win_amd64.whl
- as seen from the comments that would not have been necessary.
I have installed Python 2.7.14 from the python website
and this version Download Windows x86-64 MSI installer
On starting python on command prompt I get this:
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)] on win32
but my system type is 64 bit OS x64 based processor.