On ArchLinux python maps to python3 (python 2 is python2)
Traceback (most recent call last):
File "/home/matt/.nvm/src/node-v0.6.9/tools/waf-light", line 157, in
File "/home/matt/.nvm/src/node-v0.6.9/tools/wafadmin/Scripting.py", line 146
except Utils.WafError, e:
SyntaxError: invalid syntax
you can alias python to be python2 in your script or file a bug in node to somehow detect this.
you just need
$ export PYTHON=python2
$ nvm install v0.6.12 #or whatever version you like
@creationix what do you think about adding this to README?
send a pull request
yet it doesn't work for v0.8.6
invalid syntax :/
Could NVM at least detect python3 and report a related error? It doesn't need to work, but it would be nice if it very quickly told people that this was the problem. I imagine this could help eliminate quite a few vague bug reports.
Keep in mind that nvm is meant to be a simple tool that helps automate building node from source for some people and managing environment variables. There is no python in nvm. If node doesn't built out of the box on your platform, it's not nvm's job to detect and diagnose all these problems. That would make nvm a huge, buggy mess if we tried to do that for all platforms.
Closing this. This is something node itself should fix (and is very frustrating, I agree - I run into it with systems that have python 2.4 since it requires 2.6 or greater), not nvm.
I've created a alias but dont work :( I've replaced temporally my python -> python2 for install 0.8.3
I have a script to keep my Node.js up to date (I run it at least weekly): https://github.com/jokeyrhyme/dotfiles/blob/master/packages/nodejs-update.sh
The trick I have is this:
if [ -x /usr/bin/python2 ]; then
npm config set python /usr/bin/python2