3

I'm really trying to run this simple .py file in QTerminal, but no matter what I try, I just can't get it to run. There's nothing special or complicated about the code in the file, it's just something simple.

Every time I try to run the file I get:-

Traceback (most recent call last):
     File "Tut1.py", line 3, in <module>
       from tkinter import *
ImportError: No module named tkinter

I'm certain I've properly installed Python 3 via:

sudo apt-get install python3-tk

And I've also verified the installation. I've also added:

#!/usr/bin/env python3

But that seems to have done nothing. I can use tkinter fine in Pycharm, but running the file in QTerminal just doesn't seem to work at all. Is there anything else I can try? I am using Lubuntu 19.10.

Thank you.

1 Answers1

3

shakes head this is the second time I've answered my own question now :v

Instead of typing python Tut1.py into the QTerminal, I needed to type python3 Tut1.py. Now my little programs runs perfectly.

I am a dope.

N0rbert
  • 103,263