我是MAC的新手(OSX版本是High Sierra 10.13.3)。我用python.org的安装程序安装了python 3.6.5,我也试着用brew运行了
brew install python
。现在,我试图在一个Angular项目中运行
sudo npm install
,我得到了以下错误。
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.
我已经尝试了这里的所有答案。
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