2022:checking for Python executable "python2" in the PATH
一、node报错
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (E:\workspace\mall\mall-admin-web\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (E:\workspace\mall\mall-admin-web\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (E:\workspace\mall\mall-admin-web\node_modules\which\which.js:80:29)
gyp verb `which` failed at E:\workspace\mall\mall-admin-web\node_modules\which\which.js:89:16
gyp verb `which` failed at E:\workspace\mall\mall-admin-web\node_modules\isexe\index.js:42:5
gyp verb `which` failed at E:\workspace\mall\mall-admin-web\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:192:21)
gyp verb `which` failed python2 Error: not found: python2
gyp verb `which` failed at getNotFoundError (E:\workspace\mall\mall-admin-web\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (E:\workspace\mall\mall-admin-web\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (E:\workspace\mall\mall-admin-web\node_modules\which\which.js:80:29)
gyp verb `which` failed at E:\workspace\mall\mall-admin-web\node_modules\which\which.js:89:16
gyp verb `which` failed at E:\workspace\mall\mall-admin-web\node_modules\isexe\index.js:42:5
gyp verb `which` failed at E:\workspace\mall\mall-admin-web\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:192:21) {
gyp verb `which` failed code: 'ENOENT'
gyp verb `which` failed }
说明
1、网上常用方法一(本博主环境无效)
npm install --global --production windows-build-tools
- 这个的含义是在下载一个新的python,存放在本地目录下:C:\Users\A.windows-build-tools
- 如果你的机器没有装过python,那么这个命令有可能好使,但是,安装到这里的时候,它不会给你安装环境变量,你需要自己选择一下.
- 如果你本地装了python,有时候是无效的.
2、网上常用方法二(本博主环境无效)
修改本地环境变量
此电脑右键->属性->高级系统设置->环境变量->系统变量->path(添加本地的python路径)
*本博主这个环境的python,之前就是好使的,命令窗口输入python,是可以返回版本号的,但是使用Node时候,它还是不识别路径.
3、本博主使用方法(当前有效)
1、确保NodeJS环境安装没有问题,如果不会安装,请参考
构建工具(参考工具部署方式)
软件名称 | 版本 | 相关文章推荐 |
---|---|---|
NodeJS | 16.. | https://www.cnblogs.com/liuyangfirst/p/15998172.html |
2、方法一,修改配置文件,添加python环境到Node中
- 输入命令找到node的配置文件.
npm config get userconfig
- 根据输出路径,找到本地文件位置,右键以文本格式打开.
- 添加如下的路径配置.
3、方法二,命令行添加方式,添加python环境到Node中
- 输入如下命令,在命令窗口中。
npm config set python C:\Python27\python.exe
- 输入完这个命令,本质上它会将这个替你加入到配置文件中,所以,手动还是命令方式,随你喜欢。
二、node重新加载
- 执行完上述方法,如果是项目,删除项目的node_modules文件夹,重新执行。
npm install
结语
希望点赞,收藏,评论,转发,您的支持就是最快解救其他小伙伴的最好方法.
2022:checking for Python executable "python2" in the PATH的更多相关文章
- gyp verb check python checking for Python executable "python2" in the PATH
缺少python2.7支持 可快速使用以下语句完成安装 npm install --global --production windows-build-tools 到时候会自动下载python的 如果 ...
- 成功解决:Can‘t find Python executable “python“, you can set the PYTHON env variable.
今天跑公司新项目的时候.运行前端vue.报了一个关于python的错误.就离谱 1.问题报错全部代码 actual version of core-js. npm ERR! code 1 npm ER ...
- Error: Can't find Python executable, you can set the PYTHON env variable.
该错误解决方案. NodeJS安装Npm包时出现错误: npm WARN prefer global node-gyp@3.4.0 should be installed with -g > s ...
- 56.ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
Node.js 在安装模块的时候报错,缺少python环境. ERR! configure error gyp ERR! stack Error: Can't find Python executab ...
- Spark-shell错误:Missing Python executable 'python', defaulting to ...
最近博主因为学习<云计算导论>一课,需要在Windows上搭建Saprk,故在网上找了相关教程搭建,步骤如下: 1. Scala 2.Spark 3.Handoop 但是不管博主怎么修正, ...
- 解决Error: Can't find Python executable "python", you can set the PYTHON env variable
在执行 yarn start时遇到问题, 最后一行提示 Run `npm rebuild node-sass` to download the binding for your current env ...
- python内置模块[sys,os,os.path,stat]
python内置模块[sys,os,os.path,stat] 内置模块是python自带功能,在使用内置模块时,需要遵循 先导入在 使用 一.sys 对象 描述 sys.argv 命令行参数获取,返 ...
- Bison executable not found in PATH by mysql install
[root@luozhonghua mysql-5.5.21]# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/d ...
- Python join() 方法与os.path.join()的区别
Python join() 方法与os.path.join()的区别 pythonJoinos.path.join 今天工作中用到python的join方法,有点分不太清楚join() 方法与os.p ...
随机推荐
- windows10下设置Maven的本地仓库和阿里云的远程中央仓库
感谢原文作者:测试zhang 原文链接:https://www.jianshu.com/p/1782feee6eff 菜鸟:https://www.runoob.com/maven/ 1.设置Mave ...
- 使用 Element UI Select 组件的 value-key 属性,让绑定值可以为一个对象
EsunR 2019-11-07 12:14:42 12264 收藏 6 分类专栏: Vue 文章标签: element-ui 版权 当我们使用 Elemet UI 的选择组件进行多选时,Sele ...
- Linux防火墙(iptables/firewalld)
Linux防火墙(iptables/firewalld) 目录 Linux防火墙(iptables/firewalld) 一.iptables 1. iptables概述 2. netfilter和i ...
- 有手就行4——jenkins项目构建类型(自由风格,maven风格)
有手就行4--构建Maven项目 Jenkins项目构建类型(1)-Jenkins构建的项目类型介绍 Jenkins项目构建类型(2)-自由风格项目构建 Jenkins项目构建类型(3)-Maven项 ...
- 2022寒假集训day5
day5 五道栈的题加上字符串. 单调队列. T1 表达式括号匹配 洛谷P1739 题目描述 假设一个表达式有英文字母(小写).运算符(+,-,*,/)和左右小(圆)括号构成,以"@&q ...
- 非极大值抑制算法(Python实现)
date: 2017-07-21 16:48:02 非极大值抑制算法(Non-maximum suppression, NMS) 算法原理 非极大值抑制算法的本质是搜索局部极大值,抑制非极大值元素. ...
- 本地虚拟机在NAT网络连接模式下如何设置才可以访问外网以及使用Xshell远程连接
本文演示环境: 笔记本电脑系统:windows 7 虚拟机系统:CentOS 7 虚拟化软件:VMware Workstation 12 远程连接工具:Xshell 5 第一步: 打开虚拟网络编辑器 ...
- OC之判断数组最大最小值
超简单的筛选方法 array为你筛选的数组 NSNumber * max = [Array valueForKeyPath:@"@max.floatValue"]; NSNumbe ...
- 攻防世界MISC进阶之签到题
攻防世界MISC进阶之签到题 第一步:分析 第二步:实操 第三步:答案第一步:分析难度系数:1星题目来源: SSCTF-2017题目描述:SSCTF线上选举美男大赛开始了,泰迪拿着他 ...
- 【C# .Net GC】sos.dll 混合模式调试(托管调试+本机)
当我们想使用本机调试器(如CDB或WinDBG)调试.NET应用程序时,我们必须在本机调试器和托管世界之间使用"桥",因为本机调试器本身并不理解托管代码.它是本机调试器.为了提供这 ...