I try to create a webjob. I can upload my python files but when I try to running azure gives "ModuleNotFoundError: No module named 'numpy'" error. How can I fix this?
I try to create a webjob. I can upload my python files but when I try to running azure gives "ModuleNotFoundError: No module named 'numpy'" error. How can I fix this?
Just checking in to see if the below answers helped. If this answers your query, do click “Accept Answer” and Up-Vote for the same. And, if you have any further query do let us know.
Thanks for asking question! If you see an error like ModuleNotFoundError: No module named 'example', this means that Python could not find one or more of your modules when the application started. This most often occurs if you deploy your virtual environment with your code.
Virtual environments are not portable, so a virtual environment should not be deployed with your application code. Instead, let Oryx create a virtual environment and install your packages on the web app by creating an app setting, SCM_DO_BUILD_DURING_DEPLOYMENT, and setting it to 1. This will force Oryx to install your packages whenever you deploy to App Service.
For more information, please see this article on virtual environment portability.
Also check this discussion might help here.
Let us know if further query or issue remains.
12 people are following this question.