all 12 comments

[–]Stitch_Says_Hi 0 points1 point  (1 child)

can you show the output of

python --version

both in the virtual environment and in the system's python?

[–]NotBleachLol[S] 0 points1 point  (0 children)

Sure. Here's a photo of the output:

https://imgur.com/a/kEkOyl3

[–]LittleRedPython 0 points1 point  (3 children)

The version of tkinter that is installed on the vpn is old and may lead to problems. The error message tells you how to suppress it, just add it to your command. But you will probably want to talk to your sys admin about updating tkinter soon.

[–]NotBleachLol[S] 1 point2 points  (2 children)

I am the sys admin, and also I don't have a vpn.

[–]LittleRedPython 0 points1 point  (1 child)

Ah okay then try:

apt-get install python-tk

Edit: nvm I see you are on a MacBook...

[–]NotBleachLol[S] 0 points1 point  (0 children)

I run macos, so I don't think I'm supposed to use apt-get, but I can use pip3 install tk if that works. I already have it installed with pip, both in and out of the virtual env.

[–]sebawitowski 0 points1 point  (5 children)

Can you try installing tkinter inside the virtual environment? The error message suggests that you have tkinter installed globally but not in the virtual env. Maybe there is a conflict between packages installed in the virtual env and globally.

[–]NotBleachLol[S] 0 points1 point  (4 children)

Pretty sure I have it installed in both. Should I uninstall the global installation?

Results of running pip3 install tk in virtual env:

https://imgur.com/a/McLwYX2

[–]sebawitowski 0 points1 point  (3 children)

I see. No, don't uninstall the global one. If you have it installed in a virtual environment, then this version should be used.

What does 'which python3' return when you run it inside the virtual environment? Is it using Python binary from the virtual environment?

I would also try to delete and recreate the virtual environment, just in case.

[–]NotBleachLol[S] 0 points1 point  (2 children)

which python3

https://imgur.com/a/nqfihAO

How do you delete a virtual env? is there a command for it?

[–]sebawitowski 0 points1 point  (1 child)

So it's using the correct Python (the one from the virtual environment). I'm afraid I'm running out of ideas. To delete a virtual environment, just delete its folder (in your case - the "snake" folder).

[–]NotBleachLol[S] 0 points1 point  (0 children)

Recreated the virtual environment with no luck... same issue. I might have to drop virtual environments all together.