Building: G:\nodejs\node.exe F:\test\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli 'G:\\nodejs\\node.exe',
gyp verb cli 'F:\\test\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library='
gyp verb cli ]
gyp info using node-gyp@3.8.0
gyp info using node@12.13.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
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (F:\test\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (F:\test\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (F:\test\node_modules\which\which.js:80:29)
gyp verb `which` failed at F:\test\node_modules\which\which.js:89:16
gyp verb `which` failed at F:\test\node_modules\isexe\index.js:42:5
gyp verb `which` failed at F:\test\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:158:21)
gyp verb `which` failed python2 Error: not found: python2
gyp verb `which` failed at getNotFoundError (F:\test\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (F:\test\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (F:\test\node_modules\which\which.js:80:29)
gyp verb `which` failed at F:\test\node_modules\which\which.js:89:16
gyp verb `which` failed at F:\test\node_modules\isexe\index.js:42:5
gyp verb `which` failed at F:\test\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:158:21) {
gyp verb `which` failed stack: 'Error: not found: python2\n' +
gyp verb `which` failed ' at getNotFoundError (F:\\test\\node_modules\\which\\which.js:13:12)\n' +
gyp verb `which` failed ' at F (F:\\test\\node_modules\\which\\which.js:68:19)\n' +
gyp verb `which` failed ' at E (F:\\test\\node_modules\\which\\which.js:80:29)\n' +
gyp verb `which` failed ' at F:\\test\\node_modules\\which\\which.js:89:16\n' +
gyp verb `which` failed ' at F:\\test\\node_modules\\isexe\\index.js:42:5\n' +
gyp verb `which` failed ' at F:\\test\\node_modules\\isexe\\windows.js:36:5\n' +
gyp verb `which` failed ' at FSReqCallback.oncomplete (fs.js:158:21)',
gyp verb `which` failed code: 'ENOENT'
gyp verb `which` failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python G:\Python\Python37-32\python.EXE
gyp ERR! configure error
gyp ERR! stack Error: Command failed: G:\Python\Python37-32\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:295:12)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "G:\\nodejs\\node.exe" "F:\\test\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsas
s_library="
gyp ERR! cwd F:\test\node_modules\node-sass
gyp ERR! node -v v12.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.11.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.11.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2019-11-18T07_33_10_767Z-debug.log
Process finished with exit code 1
- 在这里安装Python 2.7
- 将 Node 降级到6.16
参考链接: How to Install Node.js® and NPM on Windows
- 删除 node_modules 文件夹。
- 在 Terminal 运行
npm install --global windows-build-tools --save - 再安装node-sass
npm install node-sass@4.12.0 --save (或最新版本)
到这里,错误应该就已经解决了,收到了 gyp info ok 的提示! - 如果遇到 Node Sass could not find a binding for your current environment,再运行
npm rebuild node-sass 就可以了
Building: G:\nodejs\node.exe F:\Carrie\Luxsens\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli 'G:\\
最近在开发vue项目,执行时,出现了关于python的相关错误,如下:
这个是因为模型需要在本机进行编译,编译的时候,需要的环境,如果它无法获取到Python的路径的话,就会报这个错误。以本人电脑为例,我电脑上同时存在和的环境,导致无法识别了。如果你电脑上已经安装过的环境,可以执行下面的代码,配置python路径,注意这个路径一定要是文件,所在的目录。
我的电脑上安装了ArcGIS,使用的是它自带的python环境,我电脑上的路径是。
然后删除依赖,重新安装依赖,上面的问题就消失了。...
那么显而易见,这个python27检测是否安装就是根据检查C:\Python27目录下是否存在python.exe
知道问题后就好办了,手动下载python27(网上各种花
项目安装的时候报
npm - gyp verb check python checking for Python executable “python2“ in the PATH
node sass 需要依赖python,只好先装上python,过程不细说
装好之后,报错依旧。
原因分析:
会不会是装python的时候环境变量设置的python.exe这里是python2.exe,于是将python.exe复制一份改个名字python2
删除 node_modules 文件夹。
在 Terminal 运行 npm install --global windows-build-tools --save
再安装node-sass npm install node-sass@4.12.0 --save(或指定版本)
到这里,错误应该就已经解决了,收到了 gyp info ok 的提示!
如果遇到 Node Sass could not find a binding for your current environment,再运行 npm reb.
将vue项目代码复制到自己电脑上安装依赖时报错:checking for Python executable "python" in the PATH用cnpm来安装即可:步骤:1. 安装cnpm:npm install cnpm -g --registry=https://registry.npm.taobao.org2. 用cnpm安装依赖:cnpm install...
vue项目在npm run serve启动时报gyp verb check python checking for Python executable “python2” in the PATH,等等;其实主要是因为项目中的node-sass需要依赖python环境运行,所以电脑配置下python就行;python官网地址,下载的是2.7的,如果打开慢或者下载慢可以直接去腾讯的软件中心下载腾讯地址;
python包下载完成后傻瓜式安装一路next就行;完事后就是配置环境变量—在你电脑的用户变量的path中加
项目场景: gyp verb check python checking for Python executable “python2” in the PATH
node v16.15.0
npm 8.5.5
npm install 报错
gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not fou