Tag Archives: npm

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)

wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
tar -xf Python-2.7.3.tgz
cd Python-2.7.3
./configure
make
make altinstall

then I installed node.js from source via these commands:

python2.7 ./configure
make
make install

The problem is, when I use npm install and try to install a node.js package which requires python > 2.4.3 I get this error:

gyp ERR! configure error
gyp ERR! stack Error: Python executable "python" is v2.4.3, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack     at failPythonVersion (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:125:14)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:114:9

how should I "pass the --python switch to point to Python >= v2.5.0"?

How to use a different version of python duing NPM install?

Salam (means Hello) :)

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)

wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
tar -xf Python-2.7.3.tgz
cd Python-2.7.3
./configure
make
make altinstall

then I installed node.js from source via these commands:

python2.7 ./configure
make
make install

The problem is, when I use npm install and try to install a node.js package which requires python > 2.4.3 I get this error:

gyp ERR! configure error
gyp ERR! stack Error: Python executable "python" is v2.4.3, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack     at failPythonVersion (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:125:14)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:114:9

how should I "pass the --python switch to point to Python >= v2.5.0"?

How to use a different version of python duing NPM install?

Salam (means Hello) :)

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)

wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
tar -xf Python-2.7.3.tgz
cd Python-2.7.3
./configure
make
make altinstall

then I installed node.js from source via these commands:

python2.7 ./configure
make
make install

The problem is, when I use npm install and try to install a node.js package which requires python > 2.4.3 I get this error:

gyp ERR! configure error
gyp ERR! stack Error: Python executable "python" is v2.4.3, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack     at failPythonVersion (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:125:14)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:114:9

how should I "pass the --python switch to point to Python >= v2.5.0"?

How to use a different version of python duing NPM install?

Salam (means Hello) :)

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)

wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
tar -xf Python-2.7.3.tgz
cd Python-2.7.3
./configure
make
make altinstall

then I installed node.js from source via these commands:

python2.7 ./configure
make
make install

The problem is, when I use npm install and try to install a node.js package which requires python > 2.4.3 I get this error:

gyp ERR! configure error
gyp ERR! stack Error: Python executable "python" is v2.4.3, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack     at failPythonVersion (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:125:14)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:114:9

how should I "pass the --python switch to point to Python >= v2.5.0"?

NPM doesn’t install any modules: network socket hangs up

Salam (means Hello) :)

I have the latest version of node.js installed on ubuntu 12.04, I'm not behind any proxies, and my network settings are correctly configured, and were intact since last time when NPM worked fine. But now NPM hangs up installation of any modules with following error:

nasser@nasser-desktop:~/projects/server v3$ npm install simple-proxy
npm WARN package.json docco@0.6.2 No repository field.
npm http GET https://registry.npmjs.org/simple-proxy
npm http GET https://registry.npmjs.org/simple-proxy
npm http GET https://registry.npmjs.org/simple-proxy
npm ERR! network socket hang up
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
npm ERR! System Linux 3.5.0-17-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "simple-proxy"
npm ERR! cwd /home/nasser/projects/serverV3
npm ERR! node -v v0.10.18
npm ERR! npm -v 1.3.8
npm ERR! code ECONNRESET
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/nasser/projects/serverV3/npm-debug.log
npm ERR! not ok code 0

NPM doesn’t install any modules: network socket hangs up

Salam :)

I have the latest version of node.js installed on ubuntu 12.04, I'm not behind any proxies, and my network settings are correctly configured, and were intact since last time when NPM worked fine. But now NPM hangs up installation of any modules with following error:

nasser@nasser-desktop:~/projects/server v3$ npm install simple-proxy
npm WARN package.json docco@0.6.2 No repository field.
npm http GET https://registry.npmjs.org/simple-proxy
npm http GET https://registry.npmjs.org/simple-proxy
npm http GET https://registry.npmjs.org/simple-proxy
npm ERR! network socket hang up
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'
npm ERR! System Linux 3.5.0-17-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "simple-proxy"
npm ERR! cwd /home/nasser/projects/serverV3
npm ERR! node -v v0.10.18
npm ERR! npm -v 1.3.8
npm ERR! code ECONNRESET
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/nasser/projects/serverV3/npm-debug.log
npm ERR! not ok code 0