python - 使用 Homebrew 安装 Python 后找不到 IDLE

标签 python macos homebrew python-idle

我最近将自己转移到 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 页面将我指向 idle3this回答Tkinter: "Python may not be configured for Tk"关于 Stack Overflow 的问题。

关于python - 使用 Homebrew 安装 Python 后找不到 IDLE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67801785/

相关文章:

python - 神经网络 MNIST

python - 在 Python 中使用麦克风录制时删除系统声音输出

objective-c - 带绑定(bind)的嵌套 NSCollectionView

c# - 单声道中的 Environment.SpecialFolder

node.js - 使用 tmux 时,未获取 nvm

pip - 无法在 mac high sierra 上卸载 awscli

python - 类型错误 : unhashable type

python - 将 Matlab 文件加载到 Python 中

macos - 难以理解 NSRemoteOpenPanel 与沙盒应用程序之间的差异

ios - xcode,在模拟器上启动可以,但无法存档