flyte / mqtt-io

Expose GPIO modules (Raspberry Pi, Beaglebone, PCF8754, PiFace2 etc.) and digital sensors (LM75 etc.) to an MQTT server for remote control and monitoring.
MIT License
467 stars 157 forks source link

How to run when outside project directory? #307

Open codeclinic opened 1 year ago

codeclinic commented 1 year ago

Hi,

How can we run this script from outside the project directory?

I really need to run this automatically at boot via crontab, but I can't figure out the correct command to get this to run unless I'm directly inside the project directory.

No matter what I try it just outputs the following: /python3: No module named mqtt_io

Thanks.

BenjiU commented 1 year ago

Please provide more information in your paths. What ist outside? Are you using virtualenv? Would supervisor be a solution for you?

codeclinic commented 1 year ago

I'm not using venv or supervisor. Just cloned the project to a local directory and then run the project as described in the readme.

If I navigate to any other directory/folder I am unable to run the script.

BenjiU commented 1 year ago

Hi @codeclinic,

if this is still relevant, please post your command lines.