when attempting to create a GUI with pythonscript an error is raised indicating that the TCL library is either missing or not correct version (if a different python version is installed)
import sys
del sys.path[:]
sys.path = ['C:\\PROGRA~1\\NOTEPA~1',
'C:\\PROGRA~1\\NOTEPA~1\\plugins\\PythonScript\\lib',
'C:\\Program Files\\Notepad++\\plugins\\PythonScript\\lib\\lib-tk',
'C:\\Users\\xxx\\AppData\\Roaming\\Notepad++\\plugins\\Config\\PythonScript\\lib',
'C:\\PROGRA~1\\NOTEPA~1\\plugins\\PythonScript\\scripts',
'C:\\Users\\xxx\\AppData\\Roaming\\Notepad++\\plugins\\Config\\PythonScript\\scripts']
sys.argv = ['']
from Tkinter import *
root = Tk()
SyntaxError: invalid syntax
Traceback (most recent call last):
File "C:\Users\xxx\AppData\Roaming\Notepad++\plugins\Config\PythonScript\scripts\geth3.py", line 11, in <module>
root = Tk()
File "C:\Program Files\Notepad++\plugins\PythonScript\lib\lib-tk\Tkinter.py", line 1685, 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\tcl\tcl8.5} C:/PROGRA~1/lib/tcl8.5 C:/PROGRA~1/lib/tcl8.5 C:/lib/tcl8.5 C:/PROGRA~1/library C:/library C:/tcl8.5.9/library C:/tcl8.5.9/library
C:/Python27/tcl/tcl8.5/init.tcl: version conflict for package "Tcl": have 8.5.9, need exactly 8.5.2
version conflict for package "Tcl": have 8.5.9, need exactly 8.5.2
while executing
"package require -exact Tcl 8.5.2"
(file "C:/Python27/tcl/tcl8.5/init.tcl" line 20)
invoked from within
"source C:/Python27/tcl/tcl8.5/init.tcl"
("uplevel" body line 1)
invoked from within
"uplevel #0 [list source $tclfile]"
This probably means that Tcl wasn't installed properly.
In my case I have another version of python from the one that tkinter is expecting, pythonscript doesn't come with its own TCL lib.