【问题标题】:I can't find IDLE after I install Python with Homebrew使用 Homebrew 安装 Python 后找不到 IDLE
【发布时间】:2022-05-18 21:54:27
【问题描述】:

我最近将自己转移到 macOS,如果这是一个非常愚蠢的问题,我深表歉意,但我已经使用 brew install python 安装了 Python 3,虽然它可以通过 CLI 按预期使用,但我不能在我的一生中,在我的系统上的任何地方都可以找到 IDLE,并且无法使用 Spotlight 之类的工具启动它。

安装时是否遗漏了什么?

谢谢! ????

【问题讨论】:

  • 在终端尝试idle-python
  • zsh: command not found: idle-python 恐怕????
  • 我不知道 MacOS 但对于 Ubuntu,空闲时,它是 sudo apt install idle-python3.8
  • 我试过brew install idle-python,这是我能想到的最接近的近似值,但无济于事。
  • 简单输入idle

标签: python macos homebrew python-idle


【解决方案1】:

在我的机器上(macOS Monterey 版本 12.3.1)IDLE 符号链接在/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 回答 Stack Overflow 上的 Tkinter: "Python may not be configured for Tk" 问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-02-23
    • 2012-04-03
    • 1970-01-01
    • 2012-01-06
    • 2013-08-05
    • 1970-01-01
    • 1970-01-01
    • 2016-06-02
    相关资源
    最近更新 更多