1

I am messing around with the GPIO and I am using my PI through SSH on my main desktop.

First: with my script I am using from Adafruit_CharLCD import Adafruit_CharLCD I also tried ~/path/to/Ada... and /home/pi/... and I am getting the import error "No module name Adafruit_CharLCD" I have downloaded the adafruit package through git and when I run the test file it works, but in my own scripts which is in a seperate folder home does not work.

Second: how do I quit, or exit my script when I launch it through sudo python script.py

1
  1. Try to copy the module files into your folder. Python will find them if they are in your current folder. Alternatively, add the folder where the modules are to the PYTHONPATH variable:
    import sys
    sys.path.append("/your/modules/folder")
    
    2. Use
    sys.exit()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.