Azure Web Job python: command not found and pip: command not found error

Nam Le 0 Reputation points
2024-11-11T01:07:24.67+00:00

I have a Flask app on Azure Web App that is deployed via Github Action. I have an Webjob set up with 2 python files, a requirements.txt, a run.sh file, and a settings.job file. This is what my run.sh looks like:

#!/bin/bash

pip install -r requirements.txt --user

python ai_agents.py

I keep getting python: command not found and pip: command not found error.

I feel like I've tried everything but the error makes no sense. Even more frustrating is that this Webjob set up used to work a couple of weeks ago. It then failed and I "fixed" it by adding --user at the end of pip install -r requirements.txt. It now is throwing the same error again.

Can somebody please help me. Much appreciated.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,036 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,006 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.