我正在尝试学习如何在 Python 中使用 tkinter 模块,但是当我在本地运行它时,我收到以下错误:
Traceback (most recent call last):
File "emailer", line 1, in <module>
from tkinter import messagebox
ImportError: No module named tkinter
Run Code Online (Sandbox Code Playgroud)
我试过了pip install tkinter,sudo pip install tkinter这会引发以下错误:
Could not find a version that satisfies the requirement tkinter (from versions: )
No matching distribution found for tkinter
Run Code Online (Sandbox Code Playgroud)
最后which python在终端中运行时,输出是/usr/bin/python