Failing to launch app on Heroku "due to Tkinter?"

Hi Community,

First post here, so “hi all”. I seem to have run into an issue. Been building a personal multipage app that (after months) looks pretty good on my local device. So I followed Adams video on deploying on Heroku.

Great video, instructions followed correctly, but I’m getting error code H10 (App crashed) and it looks like
ModuleNotFoundError: No module named ‘_tkinter’ is the issue.

And now Google results are making me feel bad! My question is why am I getting this error? My installs are numpy, pandas, plotly, dash, gunicorn, dash-bootstrap-components, and so I just don’t understand where the depencency is coming from. Or therefore what I can do about it.

Any tips from more experienced people (just about everyone) much, much appreciated.


Hello @chrismo,

Welcome to the forums.

When you made your virtual environment, did you make sure to not use global packages? The global packages will pull all the packages from everything you have in your computers python and will not be included in the pip freeze.

If not, you should spin up a new virtual environment and try to get it running there.
Then, once you get it working, perform a “pip freeze > requirements.txt” so that you have all of your packages in a file.

1 Like

Hi @jinnyzor ,

Thanks for the welcome.

Yeah I was pretty sure I got the venv right, but I did go through the process again as you suggested. Unfortunately, no fix.

Your comment on global packages was a good clue to the issue. And in fact VS Code had slipped in an import from turtle as a “solution”, which I’d neglected to take out. Part of the standard package, but built on top of tkinter (aha!). So once that was removed, problem solved.

Thanks for the help,


1 Like