当前位置: 首页 > news >正文

npm install报错 缺少python

报错信息:

Building:E:tols'nvm'nodesnodeexe : ode emos ant-desig-we-eos odemodules node-gyp'bintnode-gp.s rebld -verbose -Libsass_ext= --Libsas_cflags-
lags= --libsass_library=gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli'E: toolsnvm  nodes  node .exe!gyp verb cli'E:\\Codellemosllant-design-vue-emosllnode_moduleslnode-gypllbinllnode-gyp.js'
gyp verb cli'rebuild'gyp verb cli--verbose''--libsass_ext=',gyp verb cligyp verb clii--libsass_cflags='
gyp verb cli
'--libsass ldflags='
gyp verb cli
'--libsass library=
gyp verb cli ]
gyp info using node-gyp@3.8.0gyp info using node@14.17.0  win32  x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
which' failed Error: not found: python2gyp verb
at getNotFoundError (E:\Codeemoslant-design-vue-emosnode_modules\which\which.js:13:12)
gyp verbwhich*failed
gyp verbwhich*failed
at F (E:\Code emos ant-design-vue-emos\nodmodules which which.is:68:19
at E (E:\Code emos ant-design-vue-emos\node.modules\which\which.js:80:29
which*failedgyp verb
gyp verbwhich*failedgyp verbfailedwhich'
at E:\Code\emos\ant-design-vue-emos\nodemodules\which\which.js:89:16
at E:\Code emos ant-design-vue-emos node.modules isexe index.js:42:5
gyp verbwhich’ failedat E:\Code\emos\ant-design-vue-emos\node_modules\isexe\windows.js:36:5at FSRegCallback.oncomplete (fs.js:192:21)gyp verb which' failedpython2 Error: not found: python2

解决方法:
用管理员方式打开cmd:

//先执行这个
npm install -g node-gyp
//在执行这个
npm install --global --production windows-build-tools

把node_modules中的全部删掉重新yarn install或者 npm install

http://www.lryc.cn/news/207328.html

相关文章:

  • 达梦:开启sql日志记录
  • C语言开发,指针进阶,字符串查找,包含,拼接
  • PyCharm中文使用详解
  • 一键同步,无处不在的书签体验:探索多电脑Chrome书签同步插件
  • 在Go项目中二次封装Kafka客户端功能
  • CVE-2021-44228 Apache log4j 远程命令执行漏洞
  • 前端跨域相关
  • HTML笔记-狂神
  • python自动化测试工具selenium
  • 输入/输出应用程序接口和设备驱动程序接口
  • Python---Socket 网络通信
  • 使用 jdbc 技术升级水果库存系统(优化版本)
  • 网络协议--广播和多播
  • python爬虫入门(三)正则表达式
  • fabric.js介绍
  • YOLOv5源码中的参数超详细解析(3)— 训练部分(train.py)| 模型训练调参
  • Linux高性能编程学习-TCP/IP协议族
  • 用爬虫代码爬取高音质音频示例
  • 深度学习与计算机视觉(一)
  • 【vector题解】杨辉三角 | 删除有序数组中的重复项 | 只出现一次的数字Ⅱ
  • 金字塔切分注意力模块PSA学习笔记 (附代码)
  • Jenkins自动化测试
  • python 字典dict和列表list的读取速度问题, range合并
  • 测试用例的设计方法(全):等价类划分方法
  • Office技巧(持续更新)(Word、Excel、PPT、PowerPoint、连续引用、标题、模板、论文)
  • Java实现ORM第一个api-FindAll
  • HFSS笔记——求解器和求解分析
  • jenkins配置gitlab凭据
  • 0基础学习PyFlink——用户自定义函数之UDTF
  • 【Java 进阶篇】Java Request 原理详解