I'm new to MAC (OSX version is High Sierra 10.13.3). I installed python 3.6.5 with the installer from python.org and I tried doing it with brew too by running brew install python. Now, I'm trying to run sudo npm install in a Angular project and I get the following errors:
gyp verb check python checking for Python executable "/path/to/python3/python" in the PATH
gyp verb `which` failed Error: not found: /path/to/python3/python
gyp ERR! stack Error: Can't find Python executable "/path/to/python3/python", you can set the PYTHON env variable.
I have tried all the answers in here :
Can't find Python executable "python"
Inside of my projects folder I do the following:
when I type 'which python' I get:
/usr/local/opt/python/libexec/bin/python
When I type 'which python3.6.5' I get:
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6
/path/to/python3or/path/to/python3/pythonsomewhere? If so, you were supposed to substitute that with the actual path to python3, like/Library/Frameworks/Python.framework/Versions/3.6/bin/or/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6.brew unlink python, which should remove the Homebrew one, leaving the python.org one.gyp, AFAIK that's a dead project which doesn't support Python 3 and never will, which means installing Python 3.6 isn't going to help. Either use Apple's Python 2.7, or install another Python 2.7 instead. IIRC, for the former, it should be as simple asnpm install --python=python2.7. But if you search for help on that, instead of help on Python installations that you didn't actually need to do, you'll probably find better information.