NPM安装无法在MAC

时间:2018-06-18 20:40:19

标签: python macos npm

我是MAC新手(OSX版本是High Sierra 10.13.3)。我使用python.org的安装程序安装了python 3.6.5,并尝试通过运行brew install python来使用brew。现在,我试图在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.

我在这里尝试了所有答案:

python location on mac osx

Can't find Python executable "python"

在我的项目文件夹中,我执行以下操作:

当我输入'哪个python'我明白了:

/usr/local/opt/python/libexec/bin/python

当我键入'哪个python3.6.5'我明白了:

/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6

1 个答案:

答案 0 :(得分:0)

看起来我的node_modules文件夹搞砸了。我删除了回购并再次克隆并且有效。