我最近将自己转移到 macOS,如果这是一个非常愚蠢的问题,我深表歉意,但我已经使用 brew install python
安装了 Python 3,尽管它可以通过以下方式按预期使用一个 CLI,我一辈子都无法在我的系统上的任何地方找到 IDLE,也无法使用 Spotlight 之类的任何东西启动它。
我在安装时是否漏掉了什么?
谢谢! 😁
最佳答案
在我的机器上(macOS Monterey 版本 12.3.1)IDLE 符号链接(symbolic link)在 /usr/local/bin/idle3
即我可以使用 idle3
运行它(注意3
,不仅仅是idle
)
idle3
我还必须使用 brew install python-tk
安装 Tkinter
因为在第一次运行时 IDLE 提示它无法导入 Tkinter
** IDLE can't import Tkinter.
Your Python may not be configured for Tk. **
brew install python-tk
之后 IDLE 按预期运行,并打开 Python shell 窗口。
感谢 Installing Python 3 on MacOS DevDungeon 页面将我指向 idle3
和 this回答Tkinter: "Python may not be configured for Tk"关于 Stack Overflow 的问题。
关于python - 使用 Homebrew 安装 Python 后找不到 IDLE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67801785/