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

Gyp should check for python2 executable if default python is 3 #526

Closed
bendavis78 opened this issue Nov 5, 2014 · 6 comments · Fixed by #527
Closed

Gyp should check for python2 executable if default python is 3 #526

bendavis78 opened this issue Nov 5, 2014 · 6 comments · Fixed by #527

Comments

@bendavis78
Copy link
Contributor

It's fairly standard these days (at least in *nix flavors) to have "python2" and "python3" binaries installed in an environment where both versions are used. Ideally gyp should check for a python2 executable in the path.

Gyp currently allows explicitly setting --python, however one should only need to use this in special cases, not every time npm is called. You can also set the PYTHON environment variable in your .bashrc, but this variable is fairly generic and might affect other programs that depend on it to mean "the default python on this system".

@roboflank
Copy link

So in simple terms it cant run if your machine is running python 3.x

@bendavis78
Copy link
Contributor Author

Technically it can run if you specify the -python flag each time, but ideally this shouldn't be necessary in the default use case.

@roboflank
Copy link

I have trying npm installing bcrypt but still rejects due to my version 3 of python. Anyway to get around it?

@julianxhokaxhiu
Copy link

@denzelwamburu yes, just run

npm config set python /usr/bin/python2.7
npm install

and enjoy :)

@roboflank
Copy link

Thanks lots. You can close the issue
On Nov 28, 2014 3:10 PM, "Julian Xhokaxhiu" notifications@github.com
wrote:

@denzelwamburu https://github.com/denzelwamburu yes, just run

npm config set python /usr/bin/python2.7
npm install

and enjoy :)


Reply to this email directly or view it on GitHub
#526 (comment)
.

TooTallNate added a commit that referenced this issue May 24, 2015
Fixed #526. Check for python2 executable by default, fallback to python
@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.

4 participants