Open JensTimmerman opened 10 years ago
I just came across this issue while getting an easyconfig file ready for staden. Gap5 complained about not being able to find Tk. Turns out that Tcl's auto_path didn't include Tk's lib/tk8.6 dir. To fix this i set TCLLIBPATH to lib/tk8.6 using modextrapaths in the Tk easyconfig. Hope to submit the staden pr in due course.
I can't believe this almost 10-year old report contains a solution to something I'm still seeing in 2024...
snellius paulm@int6 08:42 ~$ m load Tkinter/3.11.3-GCCcore-12.3.0
snellius paulm@int6 08:42 ~$ m list
Currently Loaded Modules:
1) 2023 7) libreadline/8.2-GCCcore-12.3.0 13) Python/3.11.3-GCCcore-12.3.0 19) libpng/1.6.39-GCCcore-12.3.0 25) libpciaccess/0.17-GCCcore-12.3.0
2) GCCcore/12.3.0 8) Tcl/8.6.13-GCCcore-12.3.0 14) cffi/1.15.1-GCCcore-12.3.0 20) Brotli/1.0.9-GCCcore-12.3.0 26) X11/20230603-GCCcore-12.3.0
3) zlib/1.2.13-GCCcore-12.3.0 9) SQLite/3.42.0-GCCcore-12.3.0 15) cryptography/41.0.1-GCCcore-12.3.0 21) freetype/2.13.0-GCCcore-12.3.0 27) Tk/8.6.13-GCCcore-12.3.0
4) binutils/2.40-GCCcore-12.3.0 10) XZ/5.4.2-GCCcore-12.3.0 16) virtualenv/20.23.1-GCCcore-12.3.0 22) util-linux/2.39-GCCcore-12.3.0 28) Tkinter/3.11.3-GCCcore-12.3.0
5) bzip2/1.0.8-GCCcore-12.3.0 11) libffi/3.4.4-GCCcore-12.3.0 17) Python-bundle-PyPI/2023.06-GCCcore-12.3.0 23) fontconfig/2.14.2-GCCcore-12.3.0
6) ncurses/6.4-GCCcore-12.3.0 12) OpenSSL/1.1 18) expat/2.5.0-GCCcore-12.3.0 24) xorg-macros/1.20.0-GCCcore-12.3.0
snellius paulm@int6 08:42 ~$ python -c 'import tkinter; tkinter._test()'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/sw/arch/RHEL8/EB_production/2023/software/Tkinter/3.11.3-GCCcore-12.3.0/lib/python3.11/site-packages/tkinter/__init__.py", line 4623, in _test
root = Tk()
^^^^
File "/sw/arch/RHEL8/EB_production/2023/software/Tkinter/3.11.3-GCCcore-12.3.0/lib/python3.11/site-packages/tkinter/__init__.py", line 2326, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: Can't find a usable tk.tcl in the following directories:
/sw/arch/RHEL8/EB_production/2023/software/Tcl/8.6.13-GCCcore-12.3.0/lib/tcl8.6/tk8.6 /sw/arch/RHEL8/EB_production/2023/software/Tcl/8.6.13-GCCcore-12.3.0/lib/tk8.6 /sw/arch/RHEL8/EB_production/2023/software/Python/3.11.3-GCCcore-12.3.0/lib/tk8.6 /sw/arch/RHEL8/EB_production/2023/software/Python/3.11.3-GCCcore-12.3.0/lib/tk8.6 /sw/arch/RHEL8/EB_production/2023/software/Python/lib/tk8.6 /sw/arch/RHEL8/EB_production/2023/software/Python/3.11.3-GCCcore-12.3.0/library
This probably means that tk wasn't installed properly.
snellius paulm@int6 08:42 ~$ TCLLIBPATH=$EBROOTTK/lib python -c 'import tkinter; tkinter._test()'
snellius paulm@int6 08:42 ~$
Okay, so the easyconfig is still missing the necessary TCLLIBPATH
entry. Will see if I can create a pull request
thanks for looking at this @Micket this was a reminder I made for myself after finding the issue and the solution, and then seem to have never followed up on.
Turns out it needs a framework fix as well, custom delimiter for TCLLLIBPATH https://github.com/easybuilders/easybuild-framework/pull/4487
TCLLIBPATH should be set to $root/lib in all tk easyconfig's, so probably use modextrapaths