Tiny Core Linux
Tiny Core Extensions => TCE Talk => Topic started by: saladin on January 16, 2023, 11:50:45 AM
-
I'm using Pure 64, and I have Python 3.7.6 installed. tkinter is supposed to come installed with python by default, so I can't seem to install it via pip, but I'm also not seeing it in the TCZs. Am I missing something?
-
Hi saladin
You did not bother to mention which version of Tinycore you are running. Searching
through the python .info files it appears you are referring to TC10.
... tkinter is supposed to come installed with python by default, ... but I'm also not seeing it in the TCZs. ...
Is this (TK interface to the tcl tool command language) what you are looking for:
http://tinycorelinux.net/10.x/x86_64/tcz/tk.tcz.info
http://tinycorelinux.net/10.x/x86_64/tcz/tk8.6.tcz.info
-
I installed both of those, but when I run
python3 -m tkinter
it tells me "No module named '_tkinter'"
When I try to import tkinter into a python script, I'm getting the same message.
If this is tkinter, maybe it's installing for Python 2 instead of Python 3?
-
Hi saladin
It looks like you might need something called python3-tk which is not
in the repository and supposedly pip won't work.
Found here:
https://askubuntu.com/questions/815874/importerror-no-named-tkinter-please-install-the-python3-tk-package
https://stackoverflow.com/questions/6084416/tkinter-module-not-found-on-ubuntu
This may be of some help:
https://stackoverflow.com/questions/25905540/importerror-no-module-named-tkinter
I also saw some mentions of Tkinter was renamed to tkinter.
-
Hi saladin
Did you try:
pip install tk
-
I did try tk. It did successfully install something, but you're supposed to be able to verify a tkinter installation with
tkinter._test()
That gives me the error: "NameError: name 'tkinter' is not defined"
When I try
tk._test()
That gives me the error: "AttributeError: module 'tk' has no attribute '_test'".
If I run
dir(tk)
it's only giving me nine objects, and they don't look like what I should be getting with tkinter. I think this is a completely different module with a similar name.
I'm thinking I'll have to reinstall python from scratch.
-
Hi saladin
The build script for python shows tk-dev.tcz geting loaded:
http://tinycorelinux.net/10.x/x86_64/tcz/src/python3.7/python3.7.tcz.build-dep
The python .list file shows some tkinter files included:
http://tinycorelinux.net/10.x/x86_64/tcz/python3.7.tcz.list
-
Here’s how python3.6 was compiled: http://www.tinycorelinux.net/12.x/x86_64/tcz/src/python3.6/compile_python3.6
This works: tce-load -i python3.6 tk8.6
python3.6m -m tkinter
..and brings up a gui box saying "click me".
-
Ah yes, that works for me. Thank you!
I guess the problem was that I was using python 3.7.