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".
So in simple terms it cant run if your machine is running python 3.x
Technically it can run if you specify the -python flag each time, but ideally this shouldn't be necessary in the default use case.
I have trying npm installing bcrypt but still rejects due to my version 3 of python. Anyway to get around it?
@denzelwamburu yes, just run
npm config set python /usr/bin/python2.7
npm install
and enjoy :)
Thanks lots. You can close the issue
On Nov 28, 2014 3:10 PM, "Julian Xhokaxhiu" [email protected]
wrote:
@denzelwamburu https://github.com/denzelwamburu yes, just run
npm config set python /usr/bin/python2.7
npm installand enjoy :)
—
Reply to this email directly or view it on GitHub
https://github.com/TooTallNate/node-gyp/issues/526#issuecomment-64887659
.
Fixed by #527.
Most helpful comment
@denzelwamburu yes, just run
and enjoy :)