gpt4 book ai didi

python - 安装 Idle3.6 时出错

转载 作者:太空宇宙 更新时间:2023-11-04 10:21:19 25 4
gpt4 key购买 nike

我正在运行 Linux Mint 18.1 和 python 3.6。

我想安装 idle3.6 但在安装 this package 之后

我收到以下错误:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/idlelib/pyshell.py", line 4, in
<module>
from tkinter import *
File "/usr/local/lib/python3.6/tkinter/__init__.py", line 36, in
<module>
import _tkinter # If this fails your Python may not be configured for
Tk
ModuleNotFoundError: No module named '_tkinter'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/idle3.6", line 3, in <module>
from idlelib.pyshell import main
File "/usr/local/lib/python3.6/idlelib/pyshell.py", line 7, in
<module>
"Your Python may not be configured for Tk. **", file=sys.__stderr__)
NameError: name 'sys' is not defined

我的理解是我需要安装 tkinter 包。

到目前为止我试过的是这个命令:

sudo apt-get install python3-tk

但我仍然得到上述错误。

我应该使用哪个命令为 python 3.6 安装 tkinter?

最佳答案

这是一个 Linux Mint IDLE 版本:https://community.linuxmint.com/software/view/idle-python3.5 ,因为您使用的是 Linux Mint。目前还没有idle-python3.6版本。

关于python - 安装 Idle3.6 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43745664/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com