npm install报错 缺少python

编程入门 行业动态 更新时间:2024-10-28 10:33:43

npm install<a href=https://www.elefans.com/category/jswz/34/1771188.html style=报错 缺少python"/>

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

更多推荐

npm install报错 缺少python

本文发布于:2023-12-03 23:02:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1658696.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:报错   npm   install   python

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!