mpm
mpm

Reputation: 20154

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

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 .

Upvotes: 0

Views: 41

Answers (1)

Travis Reeder
Travis Reeder

Reputation: 41083

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

Upvotes: 1

Related Questions