Reputation: 5657
Using Python 3.8.0 on Mac OS 10.15.3 (Catalina) with pyenv.
When I try to run a file, it returns:
ModuleNotFoundError: No module named '_tkinter'
I've tried brew install tcl-tk
. I'm a little worried that because I'm running python on top of pyenv, any third party tkinter module doesn't get run properly.
Running brew doctor
returned:
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
`/Users/jm/.pyenv/shims/python3.7-config
/Users/jm/.pyenv/shims/python3.7m-config
/Users/jm/.pyenv/shims/python-config
/Users/jm/.pyenv/shims/python3-config
/Users/jm/.pyenv/shims/python3.8-config`
Upvotes: 9
Views: 5784
Reputation: 5293
After trying a bunch of things, this is how it finally worked:
$ brew install python-tk
Upvotes: 9
Reputation: 1
You should install tkinter
. To install tkinter
write this on console:
pip install tk
Upvotes: -1