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 > snappy@5.0.5 install C:\code\myprj\node_modules\snappy
> node-gyp rebuild C:\code\myprj\node_modules\snappy>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Users\jun\AppData\Local\Programs\Python\Python36", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\code\myprj\node_modules\snappy
gyp ERR! node -v v8.1.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok > deasync@0.1.9 install C:\code\myprj\node_modules\deasync
> node ./build.js
大致意思是python没有环境变量,但实际上已经安装了python也配置了环境变量,可就是解决不了。
如果遇到这种情况检查一下python版本是不是3.x的。如果是,那就是版本导致的错误。卸载掉3.x安装2.7的即可解决。
python-2.7.3下载地址:
https://npm.taobao.org/mirrors/python/2.7.3/python-2.7.3.msi
另外补充一点。
node-gye还需要vc++和.netFramework4.5支持。
详细如下:
https://github.com/nodejs/node-gyp
On Windows Option 1 Install all the required tools and configurations using Microsoft's windows-build-tools using npm install --global --production windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator). Option 2 Install tools and configuration manually: Visual C++ Build Environment: Option 1: Install Visual C++ Build Tools using the Default Install option. Option 2: Install Visual Studio 2015 (or modify an existing installation) and select Common Tools for Visual C++ during setup. This also works with the free Community and Express for Desktop editions. :bulb: [Windows Vista / 7 only] requires .NET Framework 4.5.1
Install Python 2.7 (v3.x.x is not supported), and run npm config set python python2.7 (or see below for further instructions on specifying the proper Python version and path.) Launch cmd, npm config set msvs_version 2015 If the above steps didn't work for you, please visit Microsoft's Node.js Guidelines for Windows for additional tips. If you have multiple Python versions installed, you can identify which Python version node-gyp uses by setting the '--python' variable:
Error: Can't find Python executable, you can set the PYTHON env variable.的更多相关文章
- 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 ...
- 解决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 ...
- 2022:checking for Python executable "python2" in the PATH
目录 一.node报错 说明 1.网上常用方法一(本博主环境无效) 2.网上常用方法二(本博主环境无效) 3.本博主使用方法(当前有效) 1.确保NodeJS环境安装没有问题,如果不会安装,请参考 构 ...
- 成功解决: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 ...
- Spark-shell错误:Missing Python executable 'python', defaulting to ...
最近博主因为学习<云计算导论>一课,需要在Windows上搭建Saprk,故在网上找了相关教程搭建,步骤如下: 1. Scala 2.Spark 3.Handoop 但是不管博主怎么修正, ...
- #error#错误原因:Cannot find executable for CFBundle 0x8ad60b0 (not loaded)
#error#错误原因:Cannot find executable for CFBundle 0x8ad60b0 </Applications/Xcode.app/Contents/Devel ...
- Introspection in Python How to spy on your Python objects Guide to Python introspection
Guide to Python introspection https://www.ibm.com/developerworks/library/l-pyint/ Guide to Python in ...
- The Python web services developer: XML-RPC for Python
原文地址:http://www.ibm.com/developerworks/webservices/library/ws-pyth10/index.html 摘要:概括地说,您可以将 XML-RPC ...
- Python开发【第一篇】Python基础之自定义模块和内置模块
为什么要有模块,将代码归类.模块,用一砣代码实现了某个功能的代码集合. Python中叫模块,其他语言叫类库. 类似于函数式编程和面向过程编程,函数式编程则完成一个功能,其他代码用来调用即可,提供了代 ...
随机推荐
- outb,inb等I/Oport操作函数
功能: 如 i386 .在差别 I/O 空间和内存空间的进程的 I/O 空间写入数据. outb() I/O 上写入 8 位数据 ( 1 字节 ). outw() I/O 上写入 16 位数据 ( ...
- JQuery插件开发标准写法
;//step01 定义JQuery的作用域 (function ($) { //step03-a 插件的默认值属性 var defaults = { prevId: 'prevBtn', prevT ...
- JAVA入门[2]-安装Maven
一.资料 1.官网: https://maven.apache.org/ 二.下载Maven 下载地址:https://maven.apache.org/download.cgi# 三.Windows ...
- 基于权限安全框架Shiro的登录验证功能实现
目前在企业级项目里做权限安全方面喜欢使用Apache开源的Shiro框架或者Spring框架的子框架Spring Security. Apache Shiro是一个强大且易用的Java安全框架,执行身 ...
- 为eclipse离线安装hibernate tools插件
工具/原料 eclipse luna jboss hibernate tools 方法/步骤 下载hibernate tools插件 在eclipse根目录下创建myplugins和l ...
- Mixed Reality-宁波市VR/AR技术应用高研班总结
年,全球AR与VR市场规模将达到1500亿美元,而根据市场研究机构BI Intelligence的统计,2020年仅头戴式VR硬件市场规模将达到28亿美元,未来5年复合增长率超过100%.本次培训从V ...
- Visual Studio 实用技能
1快捷键使用 1. Ctrl K F 代码对齐
- Python环境以及编辑器
1.Python环境搭建 http://blog.csdn.net/qq_29663071/article/details/70158204 备注:a.个人感觉 安装路径为自己选择的 位置和特性 b. ...
- Django实战,小网站实现增删改查
直接上代码 视图: from django.shortcuts import render,render_to_response, redirect from submit import models ...
- 【阿里聚安全·安全周刊】双十一背后的“霸下-七层流量清洗”系统| 大疆 VS “白帽子”,到底谁威胁了谁?
关键词:霸下-七层流量清洗系统丨大疆 VS "白帽子"丨抢购软件 "第一案"丨企业安全建设丨Aadhaar 数据泄漏丨朝鲜APT组织Lazarus丨31款违规A ...