Repository navigation
ModuleNotFoundError: No module named 'Tkinter' #158
Description
Activity
- 这是来自QQ邮箱的假期自动回复邮件。 您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
Same problem LinuxMint
'3.8.10 (default, Nov 14 2022, 12:59:47) \n[GCC 9.4.0]
Python 3.8.10`Traceback (most recent call last):
File "./ProperTree/ProperTree.py", line 5, in
import Tkinter as tk
ModuleNotFoundError: No module named 'Tkinter'During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./ProperTree/ProperTree.py", line 12, in
import tkinter as tk
ModuleNotFoundError: No module named 'tkinter'
`It's way to solve this https://stackoverflow.com/questions/34399387/linux-mint-17-tkinter-not-installed
pip3 install tkinter
should do the trickyou can use brew on macOS
Reacted by hanspeteroliver- 这是来自QQ邮箱的假期自动回复邮件。 您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
just run
brew install python-tkReacted by LeeBinder, Laurent Binder, Hashcoel, Victor Ajibade, Rodrigo Santana Camargo, Thomas Leon Highbaugh and laketiticacaReacted by Cổ Phúc, Alex Oxte, leiguo, ZMou, linuxscreen, kingdream123, e3gs and DshagaaI've solved this problem this way on macOS catalina 10.15.6.
I got "Tk older than 8.5.12 not supported." in the log, because the system provided Tcl/Tk libraries are too old.
refer to this:
Homebrew/homebrew-core#73987The following is how I fixed it.
-
Install dependence
refer to this:
https://stackoverflow.com/questions/22550068/python-not-configured-for-tk/55441855#55441855 -
Let's say you're using pyenv.
pyenv version pyenv global <version>- Link to your python3 version
brew unlink python3 && sudo ln -snf ~/.pyenv/versions/3.11.2/bin/python3 /usr/bin/python3finally I can run
ProperTree.commandwithout errors.Reacted by LeeBinderReacted by hanspeteroliver-
pip install tkinterfor windowsbrew install python-tkfor macOSsudo apt install python-tkfor linux(ubuntu)- 这是来自QQ邮箱的假期自动回复邮件。 您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
sudo apt install python-tkfor linux(ubuntu)sudo apt install python3-tkworked for me#69 i solved it by installing tk from pamac (pacman gui on manjaro back from 2020)

OS version: windows 10
python version: 3.11.2
ProperTree: last version
Running ProperTree.command and ProperTree.bat will cause errors:
