Solution: Add a [name].pth file and your package to /usr/local/lib/pythonX.Y/dist-packages.
Important Notes:
site-packages
is no longer used. Read the site.py module for more information on this.- The [name].pth contains a relative or absolute path to the directory or specific python files you want added to the interpreter, each item on its own line. (Comments prefixed with # are also recognized)
So I have this example:
/usr/local/lib/python3.2/dist-packages/mylib.pth # This file contains path to my library (relative): # Adds every .py file in mylib/ folder mylib/ mylib/static/mylibvars.py
The path
/usr/local/lib/python3.2/dist-packages/mylib/
contains library files and /usr/local/lib/python3.2/dist-packages/mylib/static/mylibvars.py
is just to show how to specify an individual file.Once you open up your interpreter, type in the following commands to check your work.
>>> import sys >>> print(sys.path)