Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

systemd and PATH

2334 Views - Created 01/11/2016

01/11/2016

Posted by:
squiregeek

squiregeek Avatar

Location:
North Carolina, USA

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

Location:
United Kingdom

andrew Twitter  andrew Website  

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

Location:
North Carolina, USA

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.