Bash web job using Python fails with python3 command not found

Alexei Humeniy 1 Reputation point
2024-09-04T16:47:25.3533333+00:00

I have a web app in Python (Fast API) and I've deployed several web jobs as zip files with a bash script to call python scripts.

When I deployed them, they ran fine, but the next day (now) they all fail with the same message:

python3: command not found

My jobs are pretty much this:

  • {name}.sh
  • {name}.py

My bash scripts are like this.

python -m venv .

source bin/activate

python -m pip install requests

python {name}.py

Restarting the web app didn't help. The main app still works fine.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,663 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.