Apr-28-2021, 01:37 PM
Looks like you have misunderstood this.
Python3 comes already installed in Mint 20.1 so no need to install python.
Was it telling you you needed to do
For python3 it is called tkinter.
You need to install Python3-tk using the software manager.
Then maybe if you just edit your code so it says
Also if you are running it from the command line and your program is called first.py
you do it this way from the directory the file is in:
Python3 comes already installed in Mint 20.1 so no need to install python.
Was it telling you you needed to do
pip install Tkinter
Quote:Tkinter is the name for python 2.x and you didn't have it installed originally.
#--------------
#Imports
#--------------
from Tkinter import *
#--------------
# Main Window
#--------------
mainWindow = Tk()
mainWindowTitle = Label(mainWindow, text="Our New GUI")
mainWindowTitle.pack()
mainWindow.mainloop()
For python3 it is called tkinter.
You need to install Python3-tk using the software manager.
Then maybe if you just edit your code so it says
from tkinter import *instead it won't complain anymore.
Also if you are running it from the command line and your program is called first.py
you do it this way from the directory the file is in:
python3 ./first.pyThere are some small syntax differences between python 2.x and python 3.x and I don't think python 2.x is being developed any more. It would be best to just write code in the 3.x version of python.