This is my first time ever writing here.
Also my first time actually coding.
I’ve made a code but have issues running it due to tKinter not seeming to exist, even though I’ve specifically installed python from the official webpage and also ticked the tcl/tk options.
When trying to launch my code i get this error:
File "C:\Users\Nikla\Desktop\roligttest.py", line 44, in
exp_bar = tk.Progressbar(exp_frame, orient=tk.HORIZONTAL, length=200, mode=’determinate’, value=20, maximum=100)
AttributeError: module ‘tkinter’ has no attribute ‘Progressbar’
This error then leads me to investigating if tkinter is installed correctly. But to my surprise I get this message:
PS C:\Users\Nikla> pip uninstall tkinter
WARNING: Skipping tkinter as it is not installed.
PS C:\Users\Nikla> pip install tkinter
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement tkinter (from versions: none)
ERROR: No matching distribution found for tkinter
Any ideas?
And keep in mind, this is my ABSOLUTE first time trying to code something.
Thanks in advance,
Niklas
I tried reinstalling tkinter, it did not exist
I tried uninstalling tkinter, it did not exist
I tried installing tkinter, it tells me "Defaulting to user installation because normal site-packages is not writable
I also get "ERROR: Could not find a version that satisfies the requirement tkinter (from versions: none)
ERROR: No matching distribution found for tkinter"-message.
>Solution :
Just use the tkk
package.
from tkinter import ttk
pb = tkk.Progressbar(exp_frame, orient=tk.HORIZONTAL, length=200, mode='determinate', value=20, maximum=100)
Also tkinter is a built in package and can’t remove