Why my Python installed via home brew not include Tkinter

后端 未结 6 1923
粉色の甜心
粉色の甜心 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:08

    Based on the comments from above and the fact that Python must be linked to Tcl/Tk framework:

    If you don't have Xcode command line tools, install those:

    xcode-select --install
    

    If you don't have Tcl/Tk brew installation (check brew list), install that:

    brew install tcl-tk
    

    Then, run "brew uninstall python" if that was not installed with option --with-tcl-tk (the current official option). Then install Python again, linking it to the brew installed Tcl/Tk:

    brew install python --with-tcl-tk
    

提交回复
热议问题