Building tkinter on Windows

  • Thread starter Westley Martínez
  • Start date
W

Westley Martínez

Hello. Can anyone tell me how to build tkinter on Windows? I've downloaded the source, ran Tools/buildbot/external.bat to build the external dependencies. I copied tcl85g.dll and tk85g.dll to PCBuild. I built the Visual Studio solution. Everything built fine without errors. Everything seems towork except tkinter. It says:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "...\cpython-idle\lib\tkinter\__init__.py", line 36, in <module>
from tkinter import _fix
File "...\cpython-idle\lib\tkinter\_fix.py", line 65, in <module>
import _tkinter
ImportError: DLL load failed: The specified module could not be found.

I'm thinking I didn't put the DLLs in the right place, but I don't have anyidea where to put them and Google isn't helping.
 
T

Terry Reedy

Hello. Can anyone tell me how to build tkinter on Windows? I've downloaded the source, ran Tools/buildbot/external.bat to build the external dependencies. I copied tcl85g.dll and tk85g.dll to PCBuild. I built the Visual Studio solution. Everything built fine without errors. Everything seems to work except tkinter. It says:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "...\cpython-idle\lib\tkinter\__init__.py", line 36, in <module>
from tkinter import _fix
File "...\cpython-idle\lib\tkinter\_fix.py", line 65, in <module>
import _tkinter
ImportError: DLL load failed: The specified module could not be found.

I'm thinking I didn't put the DLLs in the right place, but I don't haveany idea where to put them and Google isn't helping.

Some combination of the README instructions, external.bat, and the
project files are not correct. There may be an issue on the tracker. I
believe I copied tcl85g.dll and tk85g.dll into .../py3x/pcbuild from
.../tcltk/bin and that resolved the problem for me. But you say you did
that. Did _tkinter_d.pyd get built (in pcbuild)?
 
W

Westley Martínez

Some combination of the README instructions, external.bat, and the

project files are not correct. There may be an issue on the tracker. I

believe I copied tcl85g.dll and tk85g.dll into .../py3x/pcbuild from

.../tcltk/bin and that resolved the problem for me. But you say you did

that. Did _tkinter_d.pyd get built (in pcbuild)?

Well, after doing a clean clone and rebuilding everything it worked. I'm not sure what the issue was, but something must've went wrong the first time..

I see you've opened an issue about this. I think the README definitely needs to be updated. It's not very user friendly and is somewhat ambiguous. Also, I think the dev guide could be improved as well. I think Windows users (actually, I'm more of Linux user, but whatever) tend to get the short end of the stick in a lot of open-source projects. I think that's a trend that needs to change.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,967
Messages
2,570,148
Members
46,694
Latest member
LetaCadwal

Latest Threads

Top