I want to deploy a flask REST API application on IIS server to publish some ML APIs. I have installed Anaconda to run the app on its base environment as I have some data science libraries to import. I followed this link for deployment and it is working fine for the example given in the tutorial https://medium.com/@bilalbayasut/deploying-python-web-app-flask-in-windows-server-iis-using-fastcgi-6c1873ae0ad8. but in my app imports to pandas is not working. It seems my app is not running on conda base environment. Can anybody help me what configuration I need to add so that my app runs on conda base environment.
Asked
Active
Viewed 2,341 times
4
-
you also need to set another environment variable which is WSGI_ALT_VIRTUALENV_HANDLER and WSGI_ALT_VIRTUALENV_ACTIVATE_THIS , WSGI_ALT_VIRTUALENV_HANDLER, which is actually your app – Jalpa Panchal Dec 10 '19 at 05:29
-
your web.config file:
-
– Jalpa Panchal Dec 10 '19 at 05:29 -
Thanks for you inputs @JalpaPanchal. I think the configuration you specified works for deploying flask on azure using virtualenv as runtime. – Avijit Das Dec 12 '19 at 12:34
2 Answers
0
I was facing this issue with Anaconda Python 3.7.4, When I downgraded it to 3.6.5 it worked for me.

Avijit Das
- 133
- 10
0
I found a solution to this by giving the IIS site permission to access the dlls on which pandas is dependant. See my solution in this answer
Deploying Python Flask Application on IIS with wfastcgi in Python 3.7+ with Numpy, Pandas, etc

Andrew
- 163
- 8