I installed python 2.7.9 under a users directory on centOS 6.6 and then installed virtualenv and set up a project. Now the issue is, the system is using python 2.7.9 while the virtual environment is using Python 2.6.6 (the systems original python version).

I need version 2.7.9 to work with an API that requires 2.7.9, so I need to change this around to the system using 2.6.6 again and my virtual environment using 2.7.9.


To use the api that requires python 2.7, go to the user directory where your virtual environment is set up and run bin/activate. Now, you can install the api and use virtualised python. Your shell prompt will become like,


Once you are done with the work, to go back to the system python, again run, deactivate. Now, you will be out of the virt-env. your shell prompt will become like,

  • Thanks, that I have down already since that's how I was able to get the different versions running on the OS and also on the virtual environment. – ayounis90 May 29 '15 at 16:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.