Skip to content

ModuleNotFoundError: No module named 'Tkinter' #158

Description

@rehack

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

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

2

Activity

  1. ai19880612 commented on Feb 23, 2023

    @ai19880612
  2. rehack commented on Mar 4, 2023

    @rehack
    Author

    I tested propertree a black UI on the macos.
    image

  3. pavlinbl4 commented on Mar 5, 2023

    @pavlinbl4

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

  4. pavlinbl4 commented on Mar 5, 2023

    @pavlinbl4
  5. KlavierGayming commented on Mar 26, 2023

    @KlavierGayming

    pip3 install tkinter
    should do the trick

    you can use brew on macOS

  6. ai19880612 commented on Mar 26, 2023

    @ai19880612
  7. panosru commented on Mar 27, 2023

    @panosru

    just run brew install python-tk

  8. Sauvio commented on Apr 3, 2023

    @Sauvio

    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.

  9. Yihang2011 commented on Jan 13, 2024

    @Yihang2011

    pip install tkinter for windows

    brew install python-tk for macOS

    sudo apt install python-tk for linux(ubuntu)

  10. ai19880612 commented on Jan 13, 2024

    @ai19880612
  11. mikebeaton commented on Jan 15, 2024

    @mikebeaton

    sudo apt install python-tk for linux(ubuntu)

    sudo apt install python3-tk worked for me

  12. dakshshrivastav commented on Aug 17, 2026

    @dakshshrivastav

    #69 i solved it by installing tk from pamac (pacman gui on manjaro back from 2020)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions