Fix Python – How to use a different version of python during NPM install?

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 instead of make install)
tar -xf Python-2.7.3.tgz
cd Python-2.7.3
make altinstall

then I installed node.js fr….