2407 Views - Created 05/04/2016
PYTHONPATH is cleared on reboot but you can get around this by adding the path into the ~/.bashrc file which is parsed on boot. Open the .bashrc file using nano with the following command.
sudo nano ~/.bashrc
Move to the end of the file and add the following lines:
Hopefully, after you reboot the path will be visible to python so you will be able to run scripts which use the ADCPi library from anywhere in the file system.
I haven't tried this on the Raspberry Pi 3 as my development system is on a Raspberry Pi 2 but as they are both running the same version of Raspian Linux it should work fine. Just to make sure I will try setting up a new image on a Raspberry Pi 3 and check it works.
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.