To import your module, you need to add its directory to the environment variable, either temporarily or permanently.
import sys
sys.path.append("/path/to/my/modules/")
import my_module
Adding the following line to your .bashrc
file (in linux) and excecute source ~/.bashrc
in the terminal:
export PYTHONPATH="${PYTHONPATH}:/path/to/my/modules/"
Credit/Source: saarrrr, another stackexchange question