Defining PYTHONPATH automatically in virtualenvs
Question: Is possible to configure PYTHONPATH for a virtualenv automatically with
mkvirtualenv? I don't define PYTHONPATH in my ~/.bashrc, but in each
virtualenv. Every time I create a new virtualenv, I have to put these lines in
`$VIRTUAL_ENV/bin/activate` manually:

in deactivate function:

    
    
    unset PYTHONPATH
    

outside deactivate:

    
    
    PYTHONPATH="$VIRTUAL_ENV/lib/python2.7/site-packages"
    

I'd like to put these lines automatically with mkvirtualenv. I'm using
virtualenv 1.7.1.2.


Answer: The path `$VIRTUAL_ENV/lib/python2.7/site-packages` is default in virtualenv.
I only removed [ipython](http://ipython.org/) from my system and installed it
inside virtualenv:

    
    
    workon myvirtualenv
    pip install ipython
    

Thus, I checked path using inside ipython using:

    
    
    import sys
    sys.path
    

