0
  1. I need to run some long running job via Azure Web Job in Python.
  2. I am facing below error trying to import pandas. File "D:\local\Temp\jobs\triggered\demo2\eveazbwc.iyd\pandas_init_.py", line 13 missing_dependencies.append(f"{dependency}: {e}")
  3. The Web app (under which I will run the web job) also has python code using pandas, and it does not throw any error.
  4. I have tried uploading pandas and numpy folder inside the zip file (creating venv, installing packages and zipping Lib/site-packages content), (for 32 bit and 64 bit python) as well as tried appending 'D:/home/site/wwwroot/my_app_name/env/Lib/site-packages' to sys.path.
  5. I am not facing such issues in importing standard python modules or additional package modules like requests.
  6. Error is also thrown in trying to import numpy.
  7. So, I am assuming some kind of version mismatch is happening somewhere.
  8. Any pointers to solve this will be really useful.
  9. I have been using Python 3.x, not sure if I should try Python 2.x (virtual env, install package and zip content of Lib/site-packages).

Regards Kunal

Kunal
  • 11
  • 1
  • If my solution inspires or helps you, could you mark my answer as [accepted](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work) , Tks~ – Jason Pan Mar 02 '21 at 01:40
  • This approach did not solve the problem. I tried a venv for Python 2 and retried zipping up the Lib/site-packages content along with the execution scripts. Uploaded the zipped file in webjob, and this time it worked. Seems that for some reason the webjob is working only for Python 2, in this case. – Kunal Mar 05 '21 at 14:07

1 Answers1

0

The key to solving the problem is to add Python 3.6.4 x64 Extension on the portal.

Steps:

  1. Add Extensions on portal.

    enter image description here

  2. Create a requirements.txt file.

    pandas==1.1.4
    numpy==1.19.3
    
  3. Create run.cmd.

    enter image description here

  4. Create below file and zip them into a single zip.

    enter image description here

  5. Upload the zip for the webjob.

For more details, please read this post.

Webjobs Running Error (3587fd: ERR ) from zipfile

Jason Pan
  • 15,263
  • 1
  • 14
  • 29