PyInstaller fails on Windows 7: “Can't find a usable init.tcl”

后端 未结 3 565
一生所求
一生所求 2020-12-12 03:39

I have a basic Python script which uses Tkinter.

from Tkinter import Tk
from tkFileDialog import askdirectory
Tk().withdraw()
print askdirectory()

3条回答
  •  天涯浪人
    2020-12-12 04:03

    In your case you will find that there is Tcl8.X folder in python directory, it is at a place which is not mentioned in [list of directories], you mentioned in your question. Just pick any of the paths from those directory listings (preferably /lib ).

    That will allow python to find Tcl library files and it will work.

    Note: DO NOT MOVE FILES, JUST COPY THEM.

提交回复
热议问题