How to set PYTHONPATH to multiple folders

Append your paths so there is only one PYTHONPATH.

PYTHONPATH="/Applications/python/common:/Applications/sitecustomize:$PYTHONPATH"
export PYTHONPATH

Then source ~/.bash_profile

OR import them into your Python script (this would only work for the script added to):

import sys
sys.path.append("/Applications/python/common")
sys.path.append("/Applications/sitecustomize")

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)