0

I'm getting the following error message when trying to deploy my Dash app to Azure:

Error

It then cleans up and says that "Command pyton setup.py egg_info failed with error code 1 in D:\home\site\wwwroot\env\build\Pandas"

What am I doing wrong here? Is there an issue with Pandas?

1 Answers1

1

Funnily enough I ran into the exact same issue for a web app that I am working on at the moment. After 5 days of trying endless solutions I have eventually managed to get my app to deploy to Azure. My app is a Flask web app but the process is pretty much the same (if you are using Django or Dash in your case) or anything else. I am providing my answer based on the most useful links that solved my issue (I checked far too many, but these did the trick!).

This seems to be a known issue with Azure and is to do with Python version and package compatability. The first thing to check here will be the version of python you are using - if you have created your virtual environment in a version of python which is > 3.4 then you will need to install the Azure Python extension. This can be found on the left hand pane of your App Service resource under the category 'Development Tools' -> 'Extensions'. Currently the latest Python extension you can install is version 3.6.4. I had to install this as I was using python 3.6.5 for my web app:

enter image description here

I used the following answer by Konrad Lyda to help me solve my issue : Using python 3.6 on azure app services - not working despite it is installed as extension. You will have to manually install your packages using the kudu console and by adding a .skipPythonDeployment file. This is all explained in the link. I managed to replicate the same WSGI_HANDLER Error as highlighted and some further research led me to this link: https://github.com/Cojacfar/FlaskWeb . I know this link is Flask specific but the project structure should really help. You will need to add a web.config file to your project (just take the code from the web.config file in the git project) and replace the 'WSGI_HANDLER' value to the name of your app file. My app was defined in my views.py file so the value I used was 'views.app'.

The line that did it for me was:

wsgi_app = app.wsgi_app

which goes under your app declaration. For example, as I was using Flask and Flask boostrap I have the following in my app file:

app = Flask(__name__)

bootstrap = Bootstrap(app)

wsgi_app = app.wsgi_app

Once I got all my code in place I removed any unnecessary files that I did not need and deployed to Azure and it started working!

Let me know you get on. Hope this helps.

dbchudasama
  • 89
  • 1
  • 1
  • 10