0

I'm really new to Linux environment and I'm trying to use virtualenv I have CentOS 5.8 running and at first it had Python 2.4 so I upgraded it to 2.5.2 But now when I run virtualenv /test/a it still gives a error as:

Error: None
Error: this script requires Python 2.5 or greater

Any help to solve this problem is really appreciated.

Note: I installed python using:

wget http://www.python.org/ftp/python/2.5.2/Python-2.5.2.tgz
tar fxz Python-2.5.2.tgz
cd Python-2.5.2
./configure
make
make install

I installed virtualenv before the upgrade using:

yum install gcc python-virtualenv mysql-devel screen

"which userenv" says /usr/bin/virtualenv

Vinit
  • 1,815
  • 17
  • 38
  • How did you install virtualenv? And did you do so before or after upgrading Python? What does `which virtualenv` say? –  Nov 29 '12 at 18:41
  • 1
    `ls -al /usr/bin | grep virtualenv` ... what's the link to `virtualenv`? – swasheck Nov 29 '12 at 18:45
  • @swascheck- it shows virtualenv and virtualenv-2.4 – Vinit Nov 29 '12 at 18:48
  • @Vinit right. so the link is to your python2.4 installation. you should probably remove 2.4 if you have no further dependencies on it. alternatively, you can probably link to `/usr/bin/virtualenv-2.5` – swasheck Nov 29 '12 at 18:50
  • @swascheck- I tried /usr/bin/virtualenv-2.4 /test/a and it still gives the same error – Vinit Nov 29 '12 at 18:56
  • Are you sure you have installed Python 5.2.2 and exactly this version is used by default? please run `python --version` – Oleksandr Kravchuk Nov 29 '12 at 19:16
  • @Vinit you need to install `virtualenv` for python 2.5. you have multiple versions of python installed and the default is 2.4. you really need to either completely remove 2.4 and reinstall 2.5, or figure out how to make symlinks to the 2.5 install and specify virtualenv 2.5 – swasheck Nov 29 '12 at 21:44

1 Answers1

0

Updated python to 2.6 and it worked.

Vinit
  • 1,815
  • 17
  • 38