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' #78

Open
mobarakol opened this issue Mar 5, 2024 · 2 comments
Open

ModuleNotFoundError: No module named '_tkinter' #78

mobarakol opened this issue Mar 5, 2024 · 2 comments

Comments

@mobarakol
Copy link

Macbook Pro M1 Max
Python version: Python 3.11.7
Command: sksurgerybard -c config.json
Error:
File "MPHY0026/.tox/test/bin/sksurgerybard", line 5, in
from sksurgerybard.ui.sksurgerybard_command_line import main
File "MPHY0026/.tox/test/lib/python3.11/site-packages/sksurgerybard/ui/sksurgerybard_command_line.py", line 7, in
from sksurgerybard.ui.sksurgerybard_command_app import run_demo
File "MPHY0026/.tox/test/lib/python3.11/site-packages/sksurgerybard/ui/sksurgerybard_command_app.py", line 8, in
from sksurgerybard.widgets.bard_overlay_app import BARDOverlayApp
File "MPHY0026/.tox/test/lib/python3.11/site-packages/sksurgerybard/widgets/bard_overlay_app.py", line 11, in
from sksurgeryarucotracker.arucotracker import ArUcoTracker
File "MPHY0026/.tox/test/lib/python3.11/site-packages/sksurgeryarucotracker/arucotracker.py", line 9, in
from imshowtk.imshowtk import ImshowTk as Debugger
File "MPHY0026/.tox/test/lib/python3.11/site-packages/imshowtk/imshowtk.py", line 3, in
from tkinter import Tk, Canvas, NW, PhotoImage, TclError
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/tkinter/init.py", line 38, in
import _tkinter # If this fails your Python may not be configured for Tk
^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named '_tkinter'

@thompson318
Copy link
Member

@mobarakol thanks for raising. This appears to be some sort of issue with the python installation on macos, maybe related to this one pyenv/pyenv#2790. Can you provide any more information on your python installation? How was it setup?

@thompson318
Copy link
Member

And check your tcl installation
brew info tcl-tk

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

2 participants