python virtualenv does not use correct version of python -


i'm creating django app requires me use python2.7.6 . system has python3.4.1 installed have use virtualenv python2.7 installed. installed such virtualenv using pycharm , named django_python_2.7 when activate in terminal , run "python", still shows it's using system's python3.4.1: here did:

  1. activate environment:

    source django_python_2.7/bin/activate

  2. run python, , shows:

    python 3.4.1 (v3.4.1:c0e311e010fc, may 18 2014, 00:54:21) ---> system level python , not 1 installed in virtualenv

however, when run which python, shows correct path points virtualenv's python version:

/users/calvinmwhu/....../django_python_2.7/bin/python 

when explicitly run python version installed in virtualenv:

django_python_2.7/bin/python 

it shows correct version:

python 2.7.6 (default, sep  9 2014, 15:04:36)  

i have no idea what's going on. i'm developing app in pycharm ide executing commands in terminal . in terminal virtualenv not using correct version of python..why running simple "python" command in virtualenv still default system's python ?

could provide hints? necessary change path variable make contain path virtualenv's python?

if want change pythonpath used in virtualenv, can add following line virtualenv's django_python_2.7/bin/activate file

export pythonpath="/path/to/python" export old_pythonpath="$pythonpath" 

to restore original value on deactivate, add following line django_python_2.7/bin/postdeactivate script.

export pythonpath="$old_pythonpath" 

otherwise, create new env using

virtualenv -p /usr/bin/python2.7 django_python_2.7