Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

systemd and PATH

The ADC Pi is an Analogue to Digital converter for the Raspberry Pi

01/11/2016

Posted by:
squiregeek

squiregeek Avatar

I am trying to get a program using the ADC Pi Plus board on a Pi3 running Jessie to start at power-up using systemd. I get an error that says it can't find 'ABE_ACDPi'.The program works when started from the terminal, so i suspect that systemd needs path information I don't know how to provide.Is it possible to put this library in a directory that python3 can find 'out of the box,' without adding to the path environment? Failing that, how can I enter the proper path variable into the service script to get this program to run?Thanks for your help.

01/11/2016

Posted by:
andrew

andrew Avatar

HiThe simplest option would be to copy the ABE_ADCPi.py and ABE_helpers.py libraries into the same folder as your python program, that way they will be found by the program when it runs.The other option is to set up the python path in ~/.bashrc to point to the current location of the library. We have a tutorial on setting up the python path so it will work on bootup.

01/11/2016

Posted by:
squiregeek

squiregeek Avatar

Andrew,Thanks for the quick reply.I had the path in bashrc, but there seems to be an issue with systemd, root and user files. But your suggestion to move the two py files to the /home/pi directory worked like a charm. I tried to move the who ABE_ADCPi folder earlier but the system wouldmn't allow it. It didn't occur to me to just move the py files.Thanks again for the help. I'm back in business.

Sign in to post your reply


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.

Home

Shop

Learn

Forum

FAQ

Contact

0 item

Your cart is empty

Please browse our shop to order from the wide range of Raspberry Pi boards and accessories.

Subtotal:£0.00
View Basket Continue to Checkout