0

I tried to follow this guide to test huey task queue on windows: https://huey.readthedocs.io/en/latest/guide.html


when I run this command:

    huey_consumer.py demo.huey

This Error shows up:

from huey.consumer import Consumer

ImportError: No module named huey.consumer

but I tried this in python console without the issue:

from huey.consumer import Consumer

not sure why it got the issue when using huey_consumer.py

enter image description here

Jason
  • 53
  • 1
  • 6

1 Answers1

1

Looking at the linked image it might be because when typing directly huey_consumer.py demo.huey in a Windows console, you are using your default application linked to ".py" file. Meaning that you are starting your default python instance and not the one of the virtual env. (To confirm you can try to associate ".py" to a text editor and try again, it should open the text editor instead of a python)

I just checked with a venv on a windows console, when using explicitly the wanted python it works :

python.exe <YOUR_VENV_PATH>\Scripts\huey_consumer.py demo.huey
JBLaf
  • 776
  • 5
  • 10