我正在尝试像这样在 pycharm 中使用 tkinter 制作第一个桌面应用程序。
from tkinter import *
root = Tk()
mLabel = Label(root, text="This is Header")
mLabel.pack
mLabel.mainloop()
但我有一个例外说
ImportError: No module named '_tkinter', please install the python3-tk package
我试着像这样安装python3-tk
sudo apt-get install python3-tk
但后来我得到了一个关于install-info
ronem:::ronem:~$ sudo apt-get install python3-tk
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libfftw3-single3:i386 libgomp1:i386 libpam-systemd:i386
libpulsedsp:i386 libtdb1:i386
libwebrtc-audio-processing-0:i386
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
blt tk8.6-blt2.5
Suggested packages:
blt-demo tix python3-tk-dbg
The following NEW packages will be installed:
blt python3-tk tk8.6-blt2.5
0 upgraded, 3 newly installed, 0 to remove and 437 not upgraded.
1 not fully installed or removed.
Need to get 0 B/604 kB of archives.
After this operation, 2,117 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up install-info (6.1.0.dfsg.1-5) ...
/usr/sbin/update-info-dir: 3: /etc/environment: CLASSPATH: not found
dpkg: error processing package install-info (--configure):
subprocess installed post-installation script returned error exit
status 127
Errors were encountered while processing:
install-info
E: Sub-process /usr/bin/dpkg returned an error code (1)
ronem:::ronem:~$
请指导我完成我所缺少的