1

Resolved

worker role doesn't work when using virtual env with NO requirements.txt

description

Publish a worker role that uses azure library in a virtual env.
Make sure you don't have a requirements.txt, to prevent deployment from installing in the global env.

In the logs, you'll see:
Traceback (most recent call last):
  File "worker.py", line 11, in <module>
    from azure.servicebus import ServiceBusService
ImportError: No module named 'azure'
Traceback (most recent call last):
  File "worker.py", line 11, in <module>
    from azure.servicebus import ServiceBusService
ImportError: No module named 'azure'
Traceback (most recent call last):
  File "worker.py", line 11, in <module>
    from azure.servicebus import ServiceBusService
ImportError: No module named 'azure'
Traceback (most recent call last):
  File "worker.py", line 11, in <module>
    from azure.servicebus import ServiceBusService
ImportError: No module named 'azure'

comments

Zooba wrote Jun 20 at 3:54 PM

Do you still have the AzureSetup.cfg file?

Zooba wrote Jun 20 at 4:04 PM

Don't worry, figured it out. We weren't adding the env part of the path in.