Why my Python installed via home brew not include Tkinter

后端 未结 6 1932
粉色の甜心
粉色の甜心 2020-12-02 20:21

I\'ve installed my Python via homebrew on Mac.

brew install python

and after that I\'ve checked my python version as 2.7.11, then I\'ve tri

6条回答
  •  时光说笑
    2020-12-02 21:05

    If you're using pyenv you can try installing tcl-tk via homebrew and then activating the env. vars. mentioned in its caveats section, as detailed in this answer. Activating those env. vars. prior to installing python via homebrew may work for you:

    ※ export PATH="/usr/local/opt/tcl-tk/bin:$PATH"
    ※ export LDFLAGS="-L/usr/local/opt/tcl-tk/lib"
    ※ export CPPFLAGS="-I/usr/local/opt/tcl-tk/include"
    ※ export PKG_CONFIG_PATH="/usr/local/opt/tcl-tk/lib/pkgconfig"
    ※ brew reinstall python
    

提交回复
热议问题