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

后端 未结 3 566
一生所求
一生所求 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 03:42

    This is a known issue with PyInstaller and Tkinter on Windows 7 64-bit machines. There is an issue report in the GitHub repository of PyInstaller.

    All the way at the bottom this issue was referenced from another issue, namely this one which says that downgrading to PyInstaller 3.1.0 helps other people solve the issue.

    pip install pyinstaller==3.1.0
    

    I myself have been able to confirm this using a Virtual Machine.

提交回复
热议问题