gyp ERR! stack Error: Can‘t find Python executable “python“, you can set the PYTHON env variable.

简介: gyp ERR! stack Error: Can‘t find Python executable “python“, you can set the PYTHON env variable.

vue中安装node-sass

npm  install node-sass --save-dev
  • 1

出现上面图中问题

解决办法:

vscode里,打开终端,输入下面的内容

先输入(在管理员模式下打开)

npm install --global --production windows-build-tools
  • 1

否则会提示:

Please restart thie script from a administrative PowerShell!
  • 1

再输入

npm install --global node-gyp
相关文章
|
1月前
|
存储 Shell iOS开发
【Python 学习篇】 Python环境变量设置指南 (A Guide to Setting Python Environment Variables)
【Python 学习篇】 Python环境变量设置指南 (A Guide to Setting Python Environment Variables)
54 1
|
3月前
|
Python
|
Python
Python常见问题 - pip报错 ValueError: Unable to find resource t64.exe in package pip._vendor.distlib
Python常见问题 - pip报错 ValueError: Unable to find resource t64.exe in package pip._vendor.distlib
384 0
Python常见问题 - pip报错 ValueError: Unable to find resource t64.exe in package pip._vendor.distlib
|
9月前
|
前端开发 Python
npm install报错gyp ERR&! stack Error: Can‘t find Python executable python
晕了,今天安装react脚手架突然报这种奇怪的错 ,前几天还没事的
110 0
|
机器学习/深度学习 Python
【错误记录】PyCharm 运行 Python 程序报错 ( PEP 8: E402 module level import not at top of file )
【错误记录】PyCharm 运行 Python 程序报错 ( PEP 8: E402 module level import not at top of file )
2940 0
【错误记录】PyCharm 运行 Python 程序报错 ( PEP 8: E402 module level import not at top of file )
|
并行计算 PyTorch 算法框架/工具
pip安装报错:Command python setup.py egg_info failed with error code 1
pip安装报错:Command python setup.py egg_info failed with error code 1
362 2
pip安装报错:Command python setup.py egg_info failed with error code 1
成功解决ERROR: Command errored out with exit status 1: command: 'f:\program files\python\python36\pyt
成功解决ERROR: Command errored out with exit status 1: command: 'f:\program files\python\python36\pyt
|
开发工具 Python
Searching Python 3.8 libraries... ERROR: Python headers are missing in /usr/include/python3.8.
Searching Python 3.8 libraries... ERROR: Python headers are missing in /usr/include/python3.8.
445 0
|
Python
python报错——Command “python setup.py egg_info“ failed with error code 1 in /tmp/pip-build-wq8dcdx6/cry
python报错——Command “python setup.py egg_info“ failed with error code 1 in /tmp/pip-build-wq8dcdx6/cry
502 0
python报错——Command “python setup.py egg_info“ failed with error code 1 in /tmp/pip-build-wq8dcdx6/cry