Python not configured for Tk
You need to have the Tk development files/headers available during pyenv install
.
On Ubuntu (15.04) the following should provide them: sudo apt-get install tk-dev
.
After this, pyenv install 3.4.3
(or pyenv install 2.7.10
etc) should pick it up and have support for Tk.
(Reference issue in pyenv)
This is a guide for Mac users,
- Uninstall your python version. For example:
pyenv uninstall 3.7.2
- Install TK:
brew install tcl-tk
- Follow the post install steps and config tk:
export LDFLAGS="-L/usr/local/opt/tcl-tk/lib"
export CPPFLAGS="-I/usr/local/opt/tcl-tk/include"
export PATH=$PATH:/usr/local/opt/tcl-tk/bin
- Reload your terminal session and make sure all settings above are correctly set
- Install python:
pyenv install 3.7.2
The TK should work now