Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python search should prefer "python2" executable #384

Closed
benesch opened this issue Jan 14, 2014 · 4 comments
Closed

Python search should prefer "python2" executable #384

benesch opened this issue Jan 14, 2014 · 4 comments

Comments

@benesch
Copy link

benesch commented Jan 14, 2014

On systems where Python 3 is the default, node-gyp complains about an incorrect Python version, even though Python 2 is often available as python2.

Per PEP 394:

Python 2 only scripts should either be updated to be source compatible with Python 3 or else to use python2 in the shebang line

There are a few distributions that don't provide a python2 executable. But searching PATH for both python2 and python (and preferring python2) should catch cases where Python 2 is installed but node-gyp selects the wrong executable, while still supporting said distributions that don't ship a python2.

Is this something you guys'd endorse? If so, happy to provide a pull request.

@tjanson
Copy link

tjanson commented Aug 7, 2014

I agree that this is a bug. Sure, the README points out how to deal with Python3, but really: How hard would it be to fix this? You can’t expect python to point to a 2.x version anymore. Pretty much any new user who runs node install will run into this.

@cajlarsson
Copy link

+1
Ran into this today, PEP 394 defines this as a bug.

flying-sheep added a commit to flying-sheep/node-gyp that referenced this issue Sep 12, 2014
@rgbkrk
Copy link

rgbkrk commented May 21, 2015

👍

@TooTallNate
Copy link
Contributor

Fixed by #527.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants