Remote build doesn't install dependencies using python 3.2 standard runtime

41 Views Asked by At

i'm uploading a worker to iron worker running Python 3.2 with in the standard environment, using my own http client directly (not the ruby or go cli) according to the REST API. However, despite having a .worker file along with my python script in a zip file and despite successfully uploading my worker, dependencies are not installed prior to the worker execution, so I get an error like that :

Traceback (most recent call last):
  File "/mnt/task/pakt.py", line 3, in <module>
    import requests
ImportError: No module named requests

requests module is declared in my worker file that way :

pip "requests"

How can I fix this ? thanks .

1

There are 1 best solutions below

1
Travis Reeder On

You should use the new Docker based workflow, then you can be sure you have the correct dependencies, and that everything is working, before uploading.

https://github.com/iron-io/dockerworker/tree/master/python