Why my Python installed via home brew not include Tkinter

后端 未结 6 1933
粉色の甜心
粉色の甜心 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 20:59

    12/18 Update: No longer possible for various reasons.

    Below is now outdated. You'll have to install Python directly from python.org if you want to remove those warnings.


    2018 Update

    brew reinstall python --with-tcl-tk
    

    Note: Homebrew now uses Python 3 by default - Homebrew Blog. Docs.


    Testing

    python should bring up system’s Python 2, python3 should bring up Python 3.

    idle points to system Python/tcl-tk. It will show an out-dated tcl-tk error (unless you brew install python@2 --with-tcl-tk)

    idle3 should bring up Python 3 with no warnings.

    Caveat

    --with-tcl-tk will install python directly from python.org, which you'll see when you run brew info python.

    More info here.

提交回复
热议问题