0

I've been trying to run a colleague's script and though I have pandas running now, tkinter fails to load for some reason:

D:\>python
Python 3.4.2 (v3.4.2:ab2c023a9432, Oct  6 2014, 22:15:05) [MSC v.1600 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python34\lib\tkinter\__init__.py", line 36, in <module>
    from tkinter import _fix
  File "C:\Python34\lib\tkinter\_fix.py", line 65, in <module>
    import _tkinter
ImportError: DLL load failed: %1 is not a valid Win32 application.

I was under the impression tkinter shipped with Python 3.4?

My computer is a 64-bit machine running Windows 7 if that makes a difference?

bastelflp
  • 9,362
  • 7
  • 32
  • 67
Jon Cage
  • 36,366
  • 38
  • 137
  • 215
  • This problem is due to the `fix` module, as we can see from the stack trace... – nbro Feb 17 '15 at 12:10
  • Any idea how I resolve the issue? – Jon Cage Feb 17 '15 at 12:11
  • Sincerely, I would like also to solve it :D I don't care, because usually I don't use the `fix` module, but it would be great if people suggest solutions... – nbro Feb 17 '15 at 12:17
  • Have you had both a 64-bit and 32-bit version of Python installed (it seems so from your pandas question)? Apparently that can mix up 64-bit and 32-bit libs which can cause this problem. [This question describes the same problem, (although for Py2.7)](http://stackoverflow.com/q/8724729/3714930). – fhdrsdg Feb 17 '15 at 13:33
  • I have indeed. I ended up uninstalling and re-installing all things Python 3.4 related which included some fairly forcefull removal techniques as the windows installer failed. After re-installing (just) the 64 bit version it's all working. – Jon Cage Feb 17 '15 at 13:58
  • 1
    Dual installs should be improved in 3.5. I suggested 'import tkinter' as a possible test to the new .msi maintainer. – Terry Jan Reedy Feb 17 '15 at 23:16

0 Answers0