Skip to content

Doesnt work on ArchLinux #98

Closed
ghost opened this Issue Feb 2, 2012 · 11 comments

7 participants

@ghost
ghost commented Feb 2, 2012

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
import Scripting
File "/home/matt/.nvm/src/node-v0.6.9/tools/wafadmin/Scripting.py", line 146
except Utils.WafError, e:
^
SyntaxError: invalid syntax

@creationix
Owner

you can alias python to be python2 in your script or file a bug in node to somehow detect this.

@elf-pavlik

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?

@creationix
Owner

send a pull request

@barraponto

yet it doesn't work for v0.8.6
invalid syntax :/

@jokeyrhyme

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.

@creationix
Owner

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.

@ljharb
Collaborator
ljharb commented Feb 16, 2014

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.

@ljharb ljharb closed this Feb 16, 2014
@rkmax
rkmax commented Jul 12, 2015

:-1: I've created a alias but dont work :( I've replaced temporally my python -> python2 for install 0.8.3

@jokeyrhyme

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
fi
@rkmax
rkmax commented Jul 12, 2015

thanks @jokeyrhyme :+1:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.