You can add a directory to Python's path using the following code: import sys sys.path.append("/path/to/directory")