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

As was suggested, check your path. If that does not work, check your .bashrc in your home directory. A standard way to use a different python version is to use an alias for python (assigned to /usr/local/bin/python2.7 for example) in the .bashrc