Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'Tkinter' #158

Open
rehack opened this issue Feb 23, 2023 · 11 comments
Open

ModuleNotFoundError: No module named 'Tkinter' #158

rehack opened this issue Feb 23, 2023 · 11 comments

Comments

@rehack
Copy link

rehack commented Feb 23, 2023

OS version: windows 10
python version: 3.11.2
ProperTree: last version

Running ProperTree.command and ProperTree.bat will cause errors:
3

2

@ai19880612
Copy link

ai19880612 commented Feb 23, 2023 via email

@rehack
Copy link
Author

rehack commented Mar 4, 2023

I tested propertree a black UI on the macos.
image

@pavlinbl4
Copy link

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'
`

@pavlinbl4
Copy link

@KlavierGayming
Copy link

pip3 install tkinter
should do the trick

you can use brew on macOS

@ai19880612
Copy link

ai19880612 commented Mar 26, 2023 via email

@panosru
Copy link

panosru commented Mar 27, 2023

just run brew install python-tk

@Sauvio
Copy link

Sauvio commented Apr 3, 2023

I'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#73987

The following is how I fixed it.

  1. Install dependence
    refer to this:
    https://stackoverflow.com/questions/22550068/python-not-configured-for-tk/55441855#55441855

  2. Let's say you're using pyenv.

pyenv version
pyenv global <version>
  1. Link to your python3 version
brew unlink python3 && sudo ln -snf ~/.pyenv/versions/3.11.2/bin/python3 /usr/bin/python3

finally I can run ProperTree.command without errors.

@Yihang2011
Copy link

pip install tkinter for windows

brew install python-tk for macOS

sudo apt install python-tk for linux(ubuntu)

@ai19880612
Copy link

ai19880612 commented Jan 13, 2024 via email

@mikebeaton
Copy link

sudo apt install python-tk for linux(ubuntu)

sudo apt install python3-tk worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants