I need to install tkinter on debian. After some research[1][2], I noticed that Tkinter should be automatically installed with Python. However, when I try to import the module, I get the following:
>>> import tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named tkinter
When I try to import Tkinter, the error changes:
>>> import Tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
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
So I try to install the python-tk package via apt-get. Another error comes out:
E: Failed to fetch http://ftp.us.debian.org/debian/pool/main/t/tk8.5/tk8.5_8.5.14-2_amd64.deb 404 Not Found [IP: 64.50.233.100 80]
I'm on debian sid, amd64.
It seems your packages list is out of date, first retrieve new lists of packages by:
apt-get update
And then install python-tk
package with:
apt-get install python-tk
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With