1

I'm getting started using python on Mac, and I keep getting "No module named 'tkinter'"

I tried installing tkinter using brew install python3-tk

Brew could not find a pack by that name.

And according to this page anyways "As of Python 3.7.0, 3.6.8, and 2.7.16, all current Python installers for macOS downloadable from python.org supply their own private copies of Tcl/Tk 8.6.8."

But when I check in terminal for tkinter i get this python -m tkinter $/usr/bin/python: No module named tkinter

Addy
  • 11
  • 1
  • What version of Python are you working with, and where did you get it? Did you install it from python.org? – mypetlion Jul 18 '19 at 16:52
  • 1
    What does the command `python --version` print out? Mostly likely, without realizing it you are running python 2 instead of 3. – Bryan Oakley Jul 18 '19 at 16:56
  • Oh snap! it printed out `Python 2.7.10` haha. Is there a way to switch to the one I downloaded (python 3)? – Addy Jul 18 '19 at 17:00

0 Answers0