adafruit_support_mike wrote:It isn't particularly complicated, it's just a matter of providing enough information. If I were to say, "libraries work just fine where I put them", your obvious response would be, "yeah, but where do you put them?"
The Python interpreter has basically the same problem when you run a script that wants to import an external file. It's smart enough to look in the same folder as the script itself, then has a list of other folders to check if that doesn't work. If you don't want to store files in any of those places, you need to tell it the location you've chosen.
import os, sys
CURRENT_DIR = os.path.dirname(os.path.abspath('home/raspberrypi/Adafruit-Raspberry-Pi-Python-Code/Adafruit_LEDBackpack'))
from Adafruit_7Segment import SevenSegment
Users browsing this forum: No registered users and 1 guest