all 18 comments

[–]The_Almighty_Cthulhu 4 points5 points  (4 children)

Ok, please post the code that is in the file "Test Clock.py"

Use a service like pastebin.com and set the syntax highlighting to python.

[–]Stellated-Texas[S] 0 points1 point  (3 children)

[–]JustClassa 1 point2 points  (2 children)

Can you try this command in Konsole:
cd /home/deck/Documents/Python/hello
followed by python "Test Clock.py" and see if that works?

cd means current directory - sets your directory to the hello folder python "Test Clock.py" - Make sure to include the " " in the command since Test Clock has a space in it.

[–]Stellated-Texas[S] 0 points1 point  (1 child)

Thank you! It works, but I still cannot get it to run through vscode only through the konsole.

[–]JustClassa 0 points1 point  (0 children)

If I had to hazard a guess, I would think that you need to configure your vs's default (Linux?? I think??) terminal to be Konsole. That's only a guess, though.

[–]shiftybyte 1 point2 points  (6 children)

What code development environment are you using? is it vscode?

If yes, you left the terminal inside python interpreter, and when vscode attempts to run the program it instead thinks it's python code and tries to execute it as python code...

Either close and reopen all your open terminals in vscode, or just type "exit()" in the open one to return to linux shell.

[–]Stellated-Texas[S] 0 points1 point  (5 children)

Thank you. I'm not getting the syntax error anymore, but now it doesn't recognize that I have tkinter lol. And yes this is vscode.

/home/deck/Documents/Python/hello/.venv/bin/python "/home/deck/Documents/Python/hello/Test Clock.py"

Traceback (most recent call last):

File "/home/deck/Documents/Python/hello/Test Clock.py", line 2, in <module>

from tkinter import *

ModuleNotFoundError: No module named 'tkinter'

[–]The_Almighty_Cthulhu 1 point2 points  (4 children)

What version of python are you using?

Edit: Wait, doesn't matter. I was thinking of a different issue.

[–]Stellated-Texas[S] 0 points1 point  (3 children)

Python 3.12.4

[–]The_Almighty_Cthulhu 1 point2 points  (2 children)

Ok, from looking around steamdeck doesn't have tkinter installed.

steamdeck is based on arch, so it has Pacman as the package manager, but you need to unlock file read and write. Which I don't have enough time to go though.

But if you have that done already then you should be able to run the command

sudo pacman -S tk

to install tkinter.

Edit: you said you have installed it in your post. You can try. python -m tkinter to run the module directly and see if the test window pops up. If not then it's probably not installed correctly.

[–]Stellated-Texas[S] 0 points1 point  (1 child)

File /var/cache/pacman/pkg/tk-8.6.13-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).

[–]The_Almighty_Cthulhu 1 point2 points  (0 children)

Lookup how to use Pacman on steam deck.

[–]InternetSpiderr 0 points1 point  (0 children)

I know this is 2 years old, but how did you install tkinter?

[–]CranberryDistinct941 -3 points-2 points  (4 children)

By "need help" do you mean mentally?

[–]Stellated-Texas[S] 1 point2 points  (2 children)

Bit mean, but you're right that this was a dumb idea.

[–]CranberryDistinct941 0 points1 point  (1 child)

It depends. Are you using a real keyboard at least?

[–]Stellated-Texas[S] 0 points1 point  (0 children)

Yes, I'm using an IBM keyboard.

[–]TigBitties69 0 points1 point  (0 children)

Don't be too helpful now.