I have terminal access to a VPS running centos 5.9 and default python 2.4.3 installed. I also installed python 2.7.3 via these commands: (I used make altinstall
make altinstall
This one works better if you don't have the python on path or want to specify the directory :
//for Windows npm config set python C:\Python27\python.exe //for Linux npm config set python /usr/bin/python27