1

I am using Centos and have installed python 2.7 so that I can run django 1.7.

I installed python 2.7 according to https://www.digitalocean.com/community/tutorials/how-to-set-up-python-2-7-6-and-3-3-3-on-centos-6-4

The final installation step has me installing python using:

make altinstall instead of: make install

So that it doesn't replace the default os version of python.

How do I use the new version of python 2.7 instead of the old version?

Since invoking python , by default goes to the old default version, my django app doesn't point to the new version.

Please help.

Atma
  • 29,141
  • 56
  • 198
  • 299

1 Answers1

1

I would suggest you to:

  1. Install new python in any directory (e.g. /opt, /home/<you>, etc) that you're allowed to use (since you're on Centos, there should be a plenty of SELinux restrictions on executables...)
  2. virtualenv -p <path/to/fresh/python> <path/to/new/virtualenv/> (see here the full discussion)
Community
  • 1
  • 1
Vitaly Isaev
  • 5,392
  • 6
  • 45
  • 64