Not able to use tkinter in Mac OS Sonoma 14.4.1 and vscode

54 views Asked by At

guys, i'm new here, so i hope im writting a question that follows the good manners.

I have a Mac OS Sonoma 14.4.1, fully updated and just finished a Python Dev course, so really new to all of it.

Sorry for any good manner trouble i may cause with my post, and i actually searched for people with the same error but most its in windows and maybe not found the correctly post.

I'm running Python 3.12.2 on mac, trying to use tkinter with the code bellow:

import tkinter

janela =Tk()

janela.title()

It's a simple line of a tkinter course.

But its returning this error:

Traceback (most recent call last):
  File "/Users/luisfelipesouzacardoso/Documents/python/TKINTER_PROJECT/main.py", line 1, in <module>
    import tkinter
  File "/Users/luisfelipesouzacardoso/.pyenv/versions/3.12.2/lib/python3.12/tkinter/__init__.py", line 38, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk

I'm trying to read the traceback correctly, even with chatgpt teaching me what possibily could mean everyline of the error, and i already installed the pip install tk, same for tkinter, following some sugestions in internet, but i'm so newbie that i'm kinda lost and stucked.

Other libraries works fine thought.

0

There are 0 answers