corpnewt / ProperTree

Cross platform GUI plist editor written in python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ModuleNotFoundError: No module named 'Tkinter'

rehack opened this issue · comments

commented

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

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

2

commented

I tested propertree a black UI on the macos.
image

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

pip3 install tkinter
should do the trick

you can use brew on macOS

just run brew install python-tk

commented

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.