new install, now cant import tkinter
04 May 2020 12:08 #166614
by owhite
Replied by owhite on topic new install, now cant import tkinter
just following up in case anyone else follows this thread - unfortunately I was not able to fix it until I did a reinstall from here:
forum.linuxcnc.org/9-installing-linuxcnc...onic-beaver-mint-iso
...which is a great iso
forum.linuxcnc.org/9-installing-linuxcnc...onic-beaver-mint-iso
...which is a great iso
Please Log in or Create an account to join the conversation.
04 Jun 2020 18:10 - 04 Jun 2020 18:14 #170114
by arvidb
Replied by arvidb on topic new install, now cant import tkinter
I just ran into this as well. The problem seems to be that /usr/bin/update_ini has been (partially) updated for python-3, but is still set to use python-2.7. I modified the file and got it working again. See the attached patch file.
Edit: Apply like this:
Edit: Apply like this:
cd /usr/bin
sudo patch -N < path/to/update_ini.patch
Last edit: 04 Jun 2020 18:14 by arvidb.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 18562
- Thank you received: 6218
04 Jun 2020 18:25 #170115
by tommylight
Replied by tommylight on topic new install, now cant import tkinter
Ran into the same issue yesterday, updater only affected.
Thank you.
Thank you.
Please Log in or Create an account to join the conversation.
05 Jun 2020 23:32 #170299
by Marcodi
Replied by Marcodi on topic new install, now cant import tkinter
I ran into the same issue 10 days ago, apparently now there is a proposed solution for it.
I couldn't solve it and I downgraded to 2.8.0 again
.
I couldn't solve it and I downgraded to 2.8.0 again
.
Please Log in or Create an account to join the conversation.
06 Jun 2020 00:43 - 06 Jun 2020 00:43 #170305
by phillc54
Replied by phillc54 on topic new install, now cant import tkinter
It is probably worthwhile opening an issue here github.com/LinuxCNC/linuxcnc/issues
A quick look doesn't show anything similar.
A quick look doesn't show anything similar.
Last edit: 06 Jun 2020 00:43 by phillc54.
The following user(s) said Thank You: arvidb
Please Log in or Create an account to join the conversation.
06 Jun 2020 17:08 #170378
by arvidb
Replied by arvidb on topic new install, now cant import tkinter
Yes, good advice. I've opened an issue now: github.com/LinuxCNC/linuxcnc/issues/881
The following user(s) said Thank You: phillc54
Please Log in or Create an account to join the conversation.
06 Jun 2020 21:56 #170412
by rodw
Replied by rodw on topic new install, now cant import tkinter
I installed Beagle's Mint ISO build master from source yesterday and this was one missing dependency which stalled me. I think
sudo apt-get install python3-tk
sudo apt-get install python-tk
Fixed it.
Just not sure on the second one. It might have been python2-tk. I just guessed we'd need to do something for python2 as well.
So I guessed the dependency.
Not related but the only problem I have is the linuxcnc chooser it too hard to read with squashed up text It would be nice if the column was resizable.
sudo apt-get install python3-tk
sudo apt-get install python-tk
Fixed it.
Just not sure on the second one. It might have been python2-tk. I just guessed we'd need to do something for python2 as well.
So I guessed the dependency.
Not related but the only problem I have is the linuxcnc chooser it too hard to read with squashed up text It would be nice if the column was resizable.
Please Log in or Create an account to join the conversation.
23 Aug 2023 15:45 - 26 Aug 2023 05:56 #278804
by tjtr33
Replied by tjtr33 on topic new install, now cant import tkinter
Update: 26 Aug 2023
Phill Carter proved it works in 2.9.0-pre mumble
Thanks Phill
see attached png pyvcp2.9.0-pre.png
Hello, on linuxcnc 2.8.4 ,
I cannot load Jepler's teachin.py
and
reloading python3-tk then puthon-tk did not get rid of 'no module anemd tkinter'
both modules show up to date
"python3-tk is already the newest version (3.7.3-1)."
"python-tk is already the newest version (2.7.16-2)."
yet jeplers teachin.py gets error
"Traceback (most recent call last):
File "/home/tomp/linuxcnc/nc_files/teachin.py", line 27, in <module>
import tkinter
ImportError: No module named tkinter
"
TomP 22Aug2023
EDIT:
this is a bitch
python 2.nnn uses Tkinter
python 3.nnn uses tkinter
note the capital T vs lowercase t
also, most of the calls are different in format
and if you try to search Tkinter vs tkinter,
the web will pften hand you the wrong info despite quotes
Here is a good reference for python 2.nn's Tkinter
www.geeksforgeeks.org/create-first-gui-a...sing-python-tkinter/
but beware opf 'signup' nagging
To learn more on your own...
run python2.nnn ( likely default for Linuxcnc users )
then import Tkinter
then print(dir(Tkinter)) to get a list of all the keywords in he lib
then help(Tkinter.wordofinterest)) to learn more about a function
Be very wary of any code on web untill you can recognize which T/t kinter is used
HTH tomp
Phill Carter proved it works in 2.9.0-pre mumble
Thanks Phill
see attached png pyvcp2.9.0-pre.png
Hello, on linuxcnc 2.8.4 ,
I cannot load Jepler's teachin.py
and
reloading python3-tk then puthon-tk did not get rid of 'no module anemd tkinter'
both modules show up to date
"python3-tk is already the newest version (3.7.3-1)."
"python-tk is already the newest version (2.7.16-2)."
yet jeplers teachin.py gets error
"Traceback (most recent call last):
File "/home/tomp/linuxcnc/nc_files/teachin.py", line 27, in <module>
import tkinter
ImportError: No module named tkinter
"
TomP 22Aug2023
EDIT:
this is a bitch
python 2.nnn uses Tkinter
python 3.nnn uses tkinter
note the capital T vs lowercase t
also, most of the calls are different in format
and if you try to search Tkinter vs tkinter,
the web will pften hand you the wrong info despite quotes
Here is a good reference for python 2.nn's Tkinter
www.geeksforgeeks.org/create-first-gui-a...sing-python-tkinter/
but beware opf 'signup' nagging
To learn more on your own...
run python2.nnn ( likely default for Linuxcnc users )
then import Tkinter
then print(dir(Tkinter)) to get a list of all the keywords in he lib
then help(Tkinter.wordofinterest)) to learn more about a function
Be very wary of any code on web untill you can recognize which T/t kinter is used
HTH tomp
Last edit: 26 Aug 2023 05:56 by tjtr33. Reason: update
Please Log in or Create an account to join the conversation.
26 Aug 2023 06:13 #278994
by tjtr33
Replied by tjtr33 on topic new install, now cant import tkinter
I womder if a python2/Tkinter or pyton3/tkinter file could be on a tab?
I originally used a floating pane using python3/tkinter file for a project.
Then I thought , hey, embed that in an axis side panel or tab.
That began the trip here to 'embed py-mumble in a tab' realm.
The control panel created has no hal pins, no hal conmnections.
Yet it controls/reports on hardware.
It controlls stuff used while machining but not under LCNC control.
Its very independant, just close at hand.
I attacj an example pyTk cpntrol pane
( requires a /dev/ttyACM0 device connected
... any arduino with a dip 328p will do , no sketch required )
just thinking out loud
tomp
I originally used a floating pane using python3/tkinter file for a project.
Then I thought , hey, embed that in an axis side panel or tab.
That began the trip here to 'embed py-mumble in a tab' realm.
The control panel created has no hal pins, no hal conmnections.
Yet it controls/reports on hardware.
It controlls stuff used while machining but not under LCNC control.
Its very independant, just close at hand.
I attacj an example pyTk cpntrol pane
( requires a /dev/ttyACM0 device connected
... any arduino with a dip 328p will do , no sketch required )
just thinking out loud
tomp
Please Log in or Create an account to join the conversation.
Time to create page: 0.230 seconds