Using easygui in Visual Studio Python Tools

911 Views Asked by At

I'm trying to import the easygui module into Visual Studio Python Tools, but thus far I have been unable to get it to work. Whenever I run anything involving importing easygui I get the following error:

Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensio
ns\Microsoft\Python Tools for Visual Studio\2.1\visualstudio_py_util.py", line 1
06, in exec_file
exec_code(code, file, global_variables)
File "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensio
ns\Microsoft\Python Tools for Visual Studio\2.1\visualstudio_py_util.py", line 8
2, in exec_code
exec(code_obj, global_variables)
File "C:\Users\dan\documents\visual studio 2013\Projects\MoreGuiTests\MoreGuiT
ests\MoreGuiTests.py", line 1, in <module>
from easygui import *
File "C:\Users\dan\documents\visual studio 2013\Projects\MoreGuiTests\MoreGuiT
ests\easygui.py", line 155, in <module>
from Tkinter import *
File "C:\Python27\lib\lib-tk\Tkinter.py", line 38, in <module>
import FixTk
File "C:\Python27\lib\lib-tk\FixTk.py", line 65, in <module>
import _tkinter
ImportError: DLL load failed: %1 is not a valid Win32 application.

I've tried several downloads of easygui, both version .96 and .97, with one of the .96 versions having a setup.py. The other ones just have a easygui.py file and a init.py file. I've tried installing them through command prompt and importing them Visual Studio, however I haven't been able to get anything to work. I've also tried putting copies of the easygui.py and init.py into the project folder, however I would still get the same errors. I've been using Python 2.7. Any help would be greatly appreciated.

UPDATE: The problem was due to an difference in types between Python and _tkinter (x32, x64). Reinstalling Python fixed this problem.

0

There are 0 best solutions below