I’m trying to request input from a user via a Python script that uses the Tkinter/TCL GUI toolkit. When I run it from the Windows 10 PowerShell it works fine. When I try to run it from a platformio-terminal window I get an error. The main part of the error message is Can’t find a usable init.tcl in the following directories: and then it lists a bunch of paths that all end with /tcl8.5 .
I’ve tried installing & removing the following with no change to the error message:
- Python 2.7
- Atom.
- Python 3.6
- ACTIVETCL
Here’s the full error message.
Executed : python auto_build.py upload
Returned with code 1
Traceback (most recent call last):
File "auto_build.py", line 35, in <module>
root=Tk()
File "C:\Python27\Lib\lib-tk\Tkinter.py", line 1819, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
C:/Python27/lib/tcl8.5 C:/Users/bobku/.platformio/penv/lib/tcl8.5 C:/Users/bobku/.platformio/lib/tcl8.5 C:/Users/bobku/.platformio/penv/library C:/Users/bobku/.platformio/library C:/Users/bobku/.platformio/tcl8.5.15/library C:/Users/bobku/tcl8.5.15/library
This probably means that Tcl wasn't installed properly.