After successful Django deployment I get ImportError: libtk8.6.so: cannot open shared object file: No such file or directory

Bruce Martens 11 Reputation points
2022-04-15T09:25:08.02+00:00

I am trying to deploy a Python Django website to an App Service. When I use a default example it works but when I deploy my own code I keep getting the error message that tkinter is not installed. While locally my own code works. On the website itself (https://525.azurewebsites.net) there is an error message Application Error and in the Web SSH I can't install tkinter anymore because it also gives an error message (SSH CONN CLOSE). The application log contains the following error message.

193402-schermafbeelding-2022-04-15-om-112214.png

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,922 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,151 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Takahito Iwasa 4,841 Reputation points MVP
    2022-04-15T20:40:49.057+00:00

    Hi, @Bruce Martens

    I understand that you need to install a separate package with App Service on Linux.

    You can provide a startup script where you can make additional installations.
    Please refer to the following (This is a Japanese article. I'm sorry. Please translate.)

    https://qiita.com/horihiro/items/984952be9895282d14c1

    You can also refer to the following SO article.

    https://stackoverflow.com/questions/71401773/azure-django-celery-ubuntu-tkinter-libtk8-6-so-import-issue

    0 comments No comments