Reputation: 73
I'm an absolute beginner in Python and I'm just trying to follow the steps in a youtube video tutorial on building a python GUI https://youtu.be/jE-SpRI3K5g
I just wrote this so far:
import tkinter as tk
from tkinter import filedialog, Text
import os
root = tk.Tk()
root.mainloop()
But I can't proceed with the tutorial as I keep getting this error
Traceback (most recent call last):
File "C:\Users\User\Documents\Python\TEST2\main.py", line 1, in <module>
import tkinter as tk
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py", line 7, in <module>
from tkinter import messagebox
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\tkinter\messagebox.py", line 25, in <module>
from tkinter.commondialog import Dialog
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\tkinter\commondialog.py", line 13, in <module>
from tkinter import Frame
ImportError: cannot import name 'Frame' from partially initialized module 'tkinter' (most likely due to a circular import) (C:\Users\User\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py)
I'm trying to learn python from scratch, so please try to explain as simple as possible. Thank you so much!!
Upvotes: 0
Views: 2000
Reputation: 73
Apparently, I fixed everything by completely uninstalling everything and installing everything related to python again. I don't know what caused the problem but it's now fixed.
Upvotes: 1