I built a simple Django application and am trying to deploy it using Azure App Service and GitHub Actions CI/CD. While deploying, I am getting the error- Here is my project directory structure- Can somebody please help me understand what the issue is here? I came accross this answer but this is not working for me- GitHub for Django on Azure: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'
As @Azeem and @aknosis mentioned, the file name should be requirements.txt
but you have requirement.txt
. Because the command you are using is pip install requirements.txt
.
If you still face the error, check if you still have requirements.txt
in Library_Management_System
folder and delete if the file exists.
I was getting the same error when I tried to deploy my Django application.
As per my observation, I had requirements.txt
file inside the mysite project folder instead of Root folder of my application. Hence, I was not able to deploy my app to Azure.
Project Structure:
GitHub:
Later, I removed requirements.txt
file from mysite
project folder and moved it to Root folder of the repository.
Deployment:
I could deploy Django application to Azure App Service as shown below: