ADC Pi and python3
The ADC Pi is an Analogue to Digital converter for the Raspberry Pi
21/03/2018
Posted by:
tectp
I have a functional python3 program to read the values of my ADC pi board. I want to autoload it using crontab. I can run the program manually by simply typing python3 Loopback.py but trying to run it from crontab it get an import module error in python. Presumably because crontab runs as root not as pi user. What might be the solution to this?
21/03/2018
Posted by:
andrew
Have you installed the python library using the setup.py script, or are you using the adcpi.py library in the same folder as your script? If you have installed it then it could be a problem with crontab not knowing where to look for the python modules.
I found this page on StackOverflow with someone who had the same problem as you are having and a few answers that may work. It looks like you may need to define the python path in crontab in order for it to import the module.
I found this page on StackOverflow with someone who had the same problem as you are having and a few answers that may work. It looks like you may need to define the python path in crontab in order for it to import the module.
Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.