gyp 报错 not found:python2

在使用vue-cli创建vue3项目时,安装依赖时,报错

npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed     at getNotFoundError (D:\studyVue\cli-vue3\cli-vue3\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed     at F (D:\studyVue\cli-vue3\cli-vue3\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed     at E (D:\studyVue\cli-vue3\cli-vue3\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed     at D:\studyVue\cli-vue3\cli-vue3\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed     at D:\studyVue\cli-vue3\cli-vue3\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed     at D:\studyVue\cli-vue3\cli-vue3\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb `which` failed  python2 Error: not found: python2
npm ERR! gyp verb `which` failed     at getNotFoundError (D:\studyVue\cli-vue3\cli-vue3\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed     at F (D:\studyVue\cli-vue3\cli-vue3\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed     at E (D:\studyVue\cli-vue3\cli-vue3\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed     at D:\studyVue\cli-vue3\cli-vue3\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed     at D:\studyVue\cli-vue3\cli-vue3\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed     at D:\studyVue\cli-vue3\cli-vue3\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed     at FSReqCallback.oncomplete (node:fs:198:21) {npm ERR! gyp verb `which` failed   code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` succeeded python C:\Users\Chafferer\.windows-build-tools\python27\python.EXE
npm ERR! gyp verb check python version `C:\Users\Chafferer\.windows-build-tools\python27\python.EXE -c "import sys; print "2.7.15

1、先安装gyp : npm install -g node-gyp;
2、检查python的版本号,我这里使用的是2.7版本,配置环境变量,并且设置npm的变量:npm config set python python2.7
3、执行 npm config set msvs_version 2017;最后重新npm install 即可;

npm ERR gyp verb `which` failed Error: not found: python2相关推荐

  1. npm install报错:gyp verb `which` failed Error: not found: python2

    npm install后控制台报异常: npm WARN old lockfile npm WARN old lockfile The package-lock.json file was creat ...

  2. npm 安装不上bug --> “ gyp verb `which` failed Error: not found: python2“

    D:\development\黑龙江\cimbp-ui> npm i npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or ...

  3. gyp verb `which` failed Error: not found: python2解决方案

    yarn install 出现的问题 1.没有yarn npm install -g yarn 2.报错找不到phthon yarn install v1.22.17 warning package- ...

  4. npm ERR! gyp verb check python checking for Python executable “python2“ in the PATH

    下载了vue2的脚手架工程:https://github.com/PanJiaChen/vue-admin-template npm install的时候出现了异常: node-sass安装报错,缺少 ...

  5. npm ERR! gyp verb等一系列错

    npm ERR! code 1 npm ERR! path F:\新桌面\大三下\生产实习\mock-devices-master\mock-devices-master\node_modules\n ...

  6. npm install 报错 gyp info it worked if it ends with ok npm ERR! gyp verb cli [

    今天新启动一个项目,在 npm install 安装依赖项时出现报错. ERR! code 1 npm ERR! path C:\Users\Administrator\Desktop\14531\m ...

  7. npm install 报错 gyp info it worked if it ends with ok npm ERR gyp verb cli [

    今天新启动一个项目,在 npm install 安装依赖项时出现报错. ERR! code 1 npm ERR! path C:UsersAdministratorDesktope31mall-adm ...

  8. npm install 报错 ERR! gyp ERR! cwd D:\workspace\node_modules\node-sass错误解决/npm ERR! gyp verb `which

    一.问题描述: npm install 报错 ERR! gyp ERR! cwd D:\workspace\node_modules\node-sass 二.可能原因 nodejs与sass版本不匹配 ...

  9. 【环境篇 npm 报错】npm ERR gyp ERR stack import sys; print “%s.%s.%s“ % sys.version_info[:3];

    问题描述 npm ERR! code 1 npm ERR! path D:\user\Desktop\NiSown\node_modules\node-sass npm ERR! command fa ...

最新文章

  1. 【ACM】杭电OJ 4704 Sum (隔板原理+组合数求和公式+费马小定理+快速幂)
  2. 你不会想到这个购物平台竟然能智能到这种程度
  3. 通用权限管理系统组件 (GPM - General Permissions Manager) 给信息管理系统加一个初始化的功能,调用存储过程...
  4. IOS开发之CALayer基本属性和使用
  5. python 自动登录网站_python自动登录网页脚本
  6. Oracle在Linux平台安装时涉及的/etc/security/limits.conf
  7. SpringBoot+MyBatis+Redis实现SSO单点登录系统(二)
  8. Windows下通过c++调用训练好的tf模型
  9. PAT 计算机程序设计能力考试
  10. win10 html字体设置,IT之家学院:如何解决Win10屏幕字体缩放模糊问题
  11. 怎样提高数据库查询效率
  12. win禁用shift切换输入法
  13. linux usb摄像头设备,Linux系统下USB摄像头驱动开发
  14. bit,byte,b,B,KB的整理
  15. “手绘爷爷”:花甲之年再续“冰城之恋”
  16. 【计组】原码的一位乘法运算
  17. python高效识别验证码 极简 dddd
  18. 学UI设计,用对这5款设计软件是关键
  19. bitwarden_rs 搭建自托管的密码服务器
  20. html怎么转换m3u格式,HTML5视频标签可以播放m3u文件吗?

热门文章

  1. 利用Python实现员工信息管理系统 64行超简
  2. PYQT5接收自定义windows消息
  3. Python项目(Django框架)天天生鲜在CentOS7.9搭建运行
  4. 解决无法直接打开EXCEL文件的问题
  5. 工程制图计算机考试题库,2017年CAD期末考试复习题库「附答案」
  6. 计算机表格布局,什么是表格布局
  7. Amazon EKS 新功能上线——助你降低配置和管理复杂度
  8. 星宇专卖店POS收银软件管理系统 v2.49 官方版
  9. 【自学宝典】自动化课程 / 西门子、三菱、欧姆龙PLC电气设计与编程
  10. 直播视频跨浏览器预览方案(ffmpeg+VideoJS+H5)