20

So I posted this error on a Facebook group, they said I should get pip. I installed pip, when I am wanting to install tkinter it's giving me error:

I used this command first :

sudo pip install tkinter

.
.
.
error:

ERROR: Could not find a version that satisfies the requirement tkinter (from versions: none)
ERROR: No matching distribution found for tkinter
1
  • 3
    You can't install tkinter with pip. Whoever told you that you could is wrong. Commented Apr 14, 2020 at 22:29

2 Answers 2

52

After a day of headache, this worked for me:

$ brew install python-tk
Sign up to request clarification or add additional context in comments.

4 Comments

pip install tk won't work for me, but brew install python-tk did.
pip install tk will install TensorKit, not tkinter.
You are the man!
Note for the future: brew install [email protected] for specific python versions (here 3.12).
-2

I've had the same issue:

ModuleNotFoundError: No module named 'tkinter'

After quite a while I finally realized that I needed to install the python-tk package. On Linux all I needed to do was sudo apt-get install python3-tk.

3 Comments

Is that the exact error you received? From looking at askubuntu.com/questions/815874/…, I would expect the more specific one.
That's the exact error I received from python when attempting to run: import tkinter
Unfortunately, this question is about macOS, not Linux, so this answer is not really relevant.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.