求问,windows安装babel出错

gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at failNoPython (C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node
_modules\npminstall\node_modules\node-gyp\lib\configure.js:401:14)
gyp ERR! stack     at C:\Users\Administrator\AppData\Roaming\npm\node_modules\cnpm\node_modules\npmin
stall\node_modules\node-gyp\lib\configure.js:356:11

http://www.ruanyifeng.com/blog/2016/01/babel.html里面的教程,我在文件夹内通过安装 cnpm install --save-dev babel-cli 出错了,是不是要安装python,求分析谢谢!

阅读 4.1k
4 个回答

后来运行了下babel,发现可以运行,可能这个出错对转码没影响。

npm前面不需要加c的吧。

cnpm install -g python
试试,当时我开发react-native遇到这情况解决了的,gyp出错了我好像换了nodejs版本解决了的

新手上路,请多包涵

在windows7 下;我全局也安装了,当前项目也安装了;但是我babel -v 的时候报错图片描述

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题