Reputation: 11
I'm getting the following error when I try to schedule a Python file that is zipped inside a folder with its libraries.
The file uses only the pandas library, but numpy is a dependency of it, so I copied the folder of all the dependencies of pandas, like, pandas, numpy, dateutil, pytz.
But I keep getting the error, JUST ON THE WEBJOB, WEB APP AZURE, but location on my PC works normally.
[03/07/2019 14:39:00 > a4d03a: SYS INFO] Status changed to Initializing
[03/07/2019 14:39:01 > a4d03a: SYS INFO] Job directory change detected: Job file 'testeWEBJOB\test.py' timestamp differs between source and working directories.
[03/07/2019 14:39:28 > a4d03a: SYS INFO] Run script 'test.py' with script host - 'PythonScriptHost'
[03/07/2019 14:39:28 > a4d03a: SYS INFO] Status changed to Running
[03/07/2019 14:39:29 > a4d03a: ERR ] Traceback (most recent call last):
[03/07/2019 14:39:29 > a4d03a: ERR ] File "test.py", line 1, in <module>
[03/07/2019 14:39:29 > a4d03a: ERR ] import pandas as pd
[03/07/2019 14:39:29 > a4d03a: ERR ] File "D:\local\Temp\jobs\triggered\TESTE\zqwhvklh.hch\testeWEBJOB\pandas\__init__.py", line 19, in <module>
[03/07/2019 14:39:29 > a4d03a: ERR ] "Missing required dependencies {0}".format(missing_dependencies))
[03/07/2019 14:39:29 > a4d03a: ERR ] ImportError: Missing required dependencies ['numpy']
[03/07/2019 14:39:29 > a4d03a: SYS INFO] Status changed to Failed
[03/07/2019 14:39:29 > a4d03a: SYS ERR ] Job failed due to exit code 1
Please, can anyone help me?
Upvotes: 1
Views: 305
Reputation: 29995
You can follow the below steps:
1.Nav to azure portal -> your web app -> in the left blade, select Extensions -> then add the python extension(the one you used):
https://your_web_app_name.scm.azurewebsites.net
) -> In the Debug Console at the top, select CMD -> then nav to the python install dir(in my case, it's D:\home\python364x64>) -> then execute the cmd "pip install numpy"
Nav to kudu site:
In kudu site, click the Debug Console -> CMD, and change directory to D:\home\python364x64
Upvotes: 3