I am trying to add a path to the PYTHONPATH environment variable, that would be only visible from a particular virtualenv environment.
I tried SET PYTHONPATH=
SET PYTHONPATH=
import sys import os print(str(sys.path)) dir_path = os.path.dirname(os.path.realpath(__file__)) print("current working dir: %s" % dir_path) sys.path.insert(0, dir_path)
I strongly suggest you use virtualenv and virtualenvwrapper to avoid cluttering the path.