I have been trying to deploy a web application to azure using python as the backend for the web application however anytime i try to deploy from local git it works correctly however the application fails.
After trying to run the script directly from the application console on azure :
Python hostingstart.py
Results in an error:
No module Flask found
After realising this, i tried to run pip in the command-line and it seems azure has python version 3.6.6 installed which is fine, but i cannot call pip directly from the commandline.
However it does "deploy correctly" when i do a git push from local:
remote: Requirement already satisfied: click==6.7 in d:\home\site\wwwroot\env\lib\site-packages (from -r requirements.txt (line 1)) (6.7)
remote: Requirement already satisfied: Flask==1.0.2 in d:\home\site\wwwroot\env\lib\site-packages (from -r requirements.txt (line 2)) (1.0.2)
remote: Requirement already satisfied: itsdangerous==0.24 in d:\home\site\wwwroot\env\lib\site-packages (from -r requirements.txt (line 3)) (0.24)
remote: Requirement already satisfied: Jinja2==2.10 in d:\home\site\wwwroot\env\lib\site-packages (from -r requirements.txt (line 4)) (2.10)
remote: Requirement already satisfied: MarkupSafe==1.0 in d:\home\site\wwwroot\env\lib\site-packages (from -r requirements.txt (line 5)) (1.0)
remote: Requirement already satisfied: Werkzeug==0.14.1 in d:\home\site\wwwroot\env\lib\site-packages (from -r requirements.txt (line 6)) (0.14.1)
remote: You are using pip version 10.0.1, however version 19.0.3 is available.
remote: You should consider upgrading via the 'python -m pip install --upgrade pip' command.
remote: Finished successfully.
remote: Running post deployment command(s)...
remote: Deployment successful.
It seems like there is a step I am missing as I have provided my requirements in requirements.txt and azure seems to suggest they are being installed as part of the deployment...although im unsure how as pip isnt installed in the machine im accessing via the web console....can anyone explain what is going on?
Other notes that might be useful:
I deploy the application through the azure web ui not via the az webapp up as i did not want to deploy into a new linux container in a new group, i wanted the resource to be in a specific pre-defined group (not sure if this is relevant as the web app is infact up despite not resolving the dependencies).
The default deployed web app works fine showing : This web site is running Python 3.6.6.