0

I have an web app deployed on heroku (using Python), I am using now Pyppeteer to make some automatic jobs in a web site. After deploying I am getting this issue:

Request Method: GET
3.1.4   
ModuleNotFoundError 
No module named '_tkinter'  
/app/.heroku/python/lib/python3.6/tkinter/init.py, line 36, in  
/app/.heroku/python/bin/python  
3.6.12  
['/app/.heroku/python/bin', '/app', '/app/.heroku/python/lib/python36.zip', '/app/.heroku/python/lib/python3.6', '/app/.heroku/python/lib/python3.6/lib-dynload', '/app/.heroku/python/lib/python3.6/site-packages']    

Anyone faced this issue? I already used the buildpacks for chrome and puppeteer but getting same error. Also have tried:

import matplotlib
matplotlib.use("Agg")

Thanks!!

efr
  • 301
  • 3
  • 10

1 Answers1

1

Python 3.6 includes the tkinter Python code, but not the library binary.

sudo apt install python3.6-tk
Tim Roberts
  • 48,973
  • 4
  • 21
  • 30