I had python 2.6 in my server to begin with. Then I downloaded python 2.7 and installed using make and make altinstall. When I try just python in the terminal it opens up python 2.7 but sudo python opens up 2.68. all the commands like virtualenv pip use python 2.68
The python Version of user:
~> python --version Python 3.6.2 :: Continuum Analytics, Inc.
The python version of SUDO:
~> sudo python --version Python 2.7.13
If you want to execute the same version of python when using sudo, you may try:
~> sudo env "PATH=$PATH" python --version Python 3.6.2 :: Continuum Analytics, Inc.