Python: tkinter dependency is not in requirements.txt
Eirikur opened this issue · 7 comments
That's it. If I had more energy, I'd fix it.
tkinter should be pre-installed and no need to install using requirements.txt. Did you get some error?
I ran into the same problem with python3 install from apt on Ubuntu.
If this is the case for you, you can either install a custom version like recommended on stackoverflow
Or use a dependency manager like Anaconda. Personally miniconda worked for me.
I also had the same problem but I found how to do it. I made a GUI Application using Tkinter and had to call API's. This is what I typed in the requirements document to make my Application run.
tk==0.1.0
requests==2.23.0
Pillow >= 7
Fix added to README.md
@uxp123 tk
refers to the TensorKit
package, NOT tkinter
! Try sudo apt-get install python3-tk
Thanks
I have an app that does not use Tkinter directly. It uses turtle. But when I try deploying it on digital ocean, the run-time log says:
File "/workspace/.heroku/python/lib/python3.10/turtle.py", line 107, in <module> [nftrees] [2022-07-16 08:24:44] import tkinter as TK [nftrees] [2022-07-16 08:24:44] File "/workspace/.heroku/python/lib/python3.10/tkinter/__init__.py", line 37, in <module> [nftrees] [2022-07-16 08:24:44] import _tkinter # If this fails your Python may not be configured for Tk [nftrees] [2022-07-16 08:24:44] ModuleNotFoundError: No module named '_tkinter'
I can't finde any way to install it or add it in my requirements.txt