一、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的更多相关文章

  1. gyp verb check python checking for Python executable "python2" in the PATH

    缺少python2.7支持 可快速使用以下语句完成安装 npm install --global --production windows-build-tools 到时候会自动下载python的 如果 ...

  2. 成功解决: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 ...

  3. 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 ...

  4. 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 ...

  5. Spark-shell错误:Missing Python executable 'python', defaulting to ...

    最近博主因为学习<云计算导论>一课,需要在Windows上搭建Saprk,故在网上找了相关教程搭建,步骤如下: 1. Scala 2.Spark 3.Handoop 但是不管博主怎么修正, ...

  6. 解决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 ...

  7. python内置模块[sys,os,os.path,stat]

    python内置模块[sys,os,os.path,stat] 内置模块是python自带功能,在使用内置模块时,需要遵循 先导入在 使用 一.sys 对象 描述 sys.argv 命令行参数获取,返 ...

  8. 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 ...

  9. Python join() 方法与os.path.join()的区别

    Python join() 方法与os.path.join()的区别 pythonJoinos.path.join 今天工作中用到python的join方法,有点分不太清楚join() 方法与os.p ...

随机推荐

  1. document对象常用属性

    转载请注明来源:https://www.cnblogs.com/hookjc/ 注:页面上元素name属性和JavaScript引用的名称必须一致包括大小写    否则会提示你一个错误信息 " ...

  2. markdown常见问题

    图片的引用问题: ![image](./images/git命令.png) 为啥不显示图片?????? 解答:图片路径不支持中文 斜体跟加粗 *强调* 或者 _强调_ (示例:斜体) **加重强调** ...

  3. 7.3php编译安装最终版

    进过无数次折腾后发现编译php安装的有些难, 问题可能是自己对linux不太了解吧. [root@third src]# cd php-7.3.6 [root@third php-7.3.6]# ./ ...

  4. JAVA初学--Servlet详解

    一.什么是servlet? 处理请求和发送响应的过程是由一种叫做Servlet的程序来完成的,并且Servlet是为了解决实现动态页面而衍生的东西.理解这个的前提是了解一些http协议的东西,并且知道 ...

  5. ios xib约束适配要点

    基本上以下几点就能解决除横屏以外的适配问题 1.页边距约束 (Leading and Trailing space) 页边间距约束分前部间距约束(Leading space constaint)和尾部 ...

  6. Solution -「洛谷 P5827」点双连通图计数

    \(\mathcal{Description}\)   link.   求有 \(n\) 个结点的点双连通图的个数,对 \(998244353\) 取模.   \(n\le10^5\). \(\mat ...

  7. c++ Message与Folder 拷贝 析构(没有动态空间的类)

    c++ Message与Folder 拷贝 析构(没有动态空间的类) 1.两个类里边分别保存一个对方的set表,当前类有拷贝或者销毁时需要更新另一个类的set表. 2.两个类都需要访问对方的priva ...

  8. Spring Boot数据访问之数据源自动配置

    Spring Boot提供自动配置的数据访问,首先体验下,Spring Boot使用2.5.5版本: 1)导入坐标: 2.5.25版本支持8.0.26mysql数据库驱动.spring-boot-st ...

  9. Spring Boot Starter 理解

    个人理解 快速集成,快速基础配置. 参考 深入springboot原理--一步步分析springboot启动机制(starter机制) 深入springboot原理--动手封装一个starter

  10. windows下安装skywalking8.6.0(用于本地开发调试代码)

    安装jdk https://www.cnblogs.com/uncleyong/p/10732951.html 下载.安装.配置skywalking 下载 地址:https://skywalking. ...