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
相关文章
|
7月前
|
存储 Python
Python多个set中的交集
Python多个set中的交集
77 1
|
7月前
|
并行计算 Python
Python错误笔记(一):CUDA initialization: CUDA unknown error - this may be due to an incorrectly set up env
这篇文章讨论了CUDA初始化时出现的未知错误及其解决方案,包括重启系统和安装nvidia-modprobe。
995 0
|
9月前
|
索引 Python 容器
为什么Python中会有集合set类型?
为什么Python中会有集合set类型?
87 3
|
9月前
|
Python
python中set和frozenset方法和区别
python中set和frozenset方法和区别
|
8月前
|
存储 数据处理 Python
Python中的Set集合:高效数据处理的利器
Python中的Set集合:高效数据处理的利器
123 0
|
9月前
|
JavaScript 前端开发 Python
成功解决:Can‘t find Python executable “python“, you can set the PYTHON env variable.
这篇文章分享了作者在运行前端Vue项目时遇到的关于Python执行环境的问题和解决方法。问题是由于找不到Python可执行文件导致的编译错误,解决方法包括安装编译环境、卸载并重新安装出现问题的`node-sass`包,并重新执行`npm install`和`npm run dev`。
成功解决:Can‘t find Python executable “python“, you can set the PYTHON env variable.
|
9月前
|
测试技术 索引 Python
Python接口自动化测试框架(基础篇)-- 常用数据类型list&set()
本文介绍了Python中list和set两种数据类型的使用,包括它们的创建、取值、增删改查操作、排序以及内置函数的使用,还探讨了list的比较函数和set的快速去重功能。
90 0
|
2月前
|
编译器 C++ 容器
【c++丨STL】基于红黑树模拟实现set和map(附源码)
本文基于红黑树的实现,模拟了STL中的`set`和`map`容器。通过封装同一棵红黑树并进行适配修改,实现了两种容器的功能。主要步骤包括:1) 修改红黑树节点结构以支持不同数据类型;2) 使用仿函数适配键值比较逻辑;3) 实现双向迭代器支持遍历操作;4) 封装`insert`、`find`等接口,并为`map`实现`operator[]`。最终,通过测试代码验证了功能的正确性。此实现减少了代码冗余,展示了模板与仿函数的强大灵活性。
79 2
|
3月前
|
编译器 容器
哈希表模拟封装unordered_map和unordered_set
哈希表模拟封装unordered_map和unordered_set
|
3月前
|
编译器 测试技术 计算机视觉
红黑树模拟封装map和set
红黑树模拟封装map和set