在测试pytorch的mmdetection时遇到了
ImportError: No module named '_tkinter', please install the python3-tk package
还好参考了这位博主的博客一秒钟解决问题,ok。
参考教程,换了阿里的源,用 sudo vim /etc/apt/sources.list 覆盖了原文件后,执行
$ sudo apt-get update
过程中没出现什么错误,接着执行
$ sudo apt-get install python3-tk
it‘s ok
执行过程
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libpython3.6-minimal linux-headers-4.15.0-29 linux-headers-4.15.0-29-generic linux-image-4.15.0-29-generic linux-modules-4.15.0-29-generic vim-runtime
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 packages will be REMOVED:
libpython3.6 libpython3.6-stdlib vim
The following NEW packages will be installed:
blt python3-tk tk8.6-blt2.5
0 upgraded, 3 newly installed, 3 to remove and 52 not upgraded.
Need to get 604 kB of archives.
After this operation, 13.5 MB disk space will be freed.
Do you want to continue? [Y/n]