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

tk ImportError #1

Open
cbehn1 opened this issue Jul 26, 2019 · 1 comment
Open

tk ImportError #1

cbehn1 opened this issue Jul 26, 2019 · 1 comment

Comments

@cbehn1
Copy link

cbehn1 commented Jul 26, 2019

$ python spat.py
Traceback (most recent call last):
  File "spat.py", line 43, in <module>
    from Tkinter import *
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 42, in <module>
    raise ImportError, str(msg) + ', please install the python-tk package'
ImportError: No module named _tkinter, please install the python-tk package
@jafeelv
Copy link

jafeelv commented May 8, 2023

The error message suggests that you need to install the python-tk package in order to use the Tkinter library in Python 2.7.

You can install the python-tk package by running the following command in your terminal or command prompt:

sudo apt-get install python-tk

This will install the package and its dependencies on your system.
Once the package is installed, you should be able to import the Tkinter module without getting the _tkinter ImportError.

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