Reputation: 43
I have been recently attempting to try out some minor game development with Python 3.9 and have been running into some problems. For some reason, Python does not recognize that I have tkinter installed. From what I have seen online, a big fix is to make sure the path variables are set up correctly. I have already added it to my env variables but that has not seemed to fix anything.
I also know I have it installed, as I see it here in my Python site-packages folder.
At this point, I am stumped. I do have the import as tkinter as well and not Tkinter. The only thing I can think of now is totally uninstalling Python but I would prefer not to do that if there are any other options.
Here is the code:
import math
import random
import pygame
import tkinter as tk
from tkinter import messagebox
class cube(object):
rows = 20
w = 500
I am using Windows 10 and VSCode as well. Anything helps and thanks!
Upvotes: 1
Views: 553
Reputation: 43
Seems I somehow screwed up my Python installation. Completely removing it from my system and reinstalling seemed to fix all of my issues.
Upvotes: 3