gpt4 book ai didi

python - Tkinter: "Python may not be configured for Tk"

转载 作者:IT老高 更新时间:2023-10-28 21:41:28 30 4
gpt4 key购买 nike

今天我想开始使用 Tkinter,但我遇到了一些问题。

Python 3.2 (r32:88445, Mar 28 2011, 04:14:07) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from tkinter import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.2/tkinter/__init__.py", line 39, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter

那么如何配置我的 Python 3.2 以使用 Tkinter?

最佳答案

在 Arch/Manjaro 下只需安装包 tk:

sudo pacman -S tk

关于python - Tkinter: "Python may not be configured for Tk",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5459444/

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