首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当我试图安装opencv4nodejs时,我得到了一个错误

当我试图安装opencv4nodejs时,我得到了一个错误
EN

Stack Exchange QA用户
提问于 2018-12-26 10:26:24
回答 1查看 7.3K关注 0票数 3

我是appium使用javascript的新手,为了安装appium,我遵循以下链接用javascript设置appium

所以当我安装appium医生并运行它时,我得到了一个错误。

代码语言:javascript
复制
info AppiumDoctor Appium Doctor v.1.7.0
info AppiumDoctor ### Diagnostic for necessary dependencies starting ###
info AppiumDoctor  ✔ The Node.js binary was found at: C:\Program 
Files\nodejs\node.EXE
info AppiumDoctor  ✔ Node version is 8.11.3
info AppiumDoctor  ✔ ANDROID_HOME is set to: 
C:\Users\Dbaux\AppData\Local\Android\Sdk
info AppiumDoctor  ✔ JAVA_HOME is set to: C:\Program Files\Java\jdk1.8.0_171
info AppiumDoctor  ✔ adb exists at: 
C:\Users\Dbaux\AppData\Local\Android\Sdk\platform-tools\adb.exe
info AppiumDoctor  ✔ android exists at: 
C:\Users\Dbaux\AppData\Local\Android\Sdk\tools\android.bat
info AppiumDoctor  ✔ emulator exists at: 
C:\Users\Dbaux\AppData\Local\Android\Sdk\tools\emulator.exe
info AppiumDoctor  ✔ Bin directory of %JAVA_HOME% is set
info AppiumDoctor ### Diagnostic for necessary dependencies completed, no 
fix needed. ###
info AppiumDoctor
info AppiumDoctor ### Diagnostic for optional dependencies starting ###
WARN AppiumDoctor  ✖ opencv4nodejs cannot be found.
info AppiumDoctor ### Diagnostic for optional dependencies completed, one 
fix needed. ###
info AppiumDoctor
info AppiumDoctor ### Optional Manual Fixes ###
info AppiumDoctor The configuration can install optionally. Please do the 
following manually:
WARN AppiumDoctor  ➜ Why opencv4nodejs is needed and how to install it is: 
https://github.com/appium/appium/blob/master/docs/en/writing-running- 
appium/image-comparison.md
info AppiumDoctor
info AppiumDoctor ###
info AppiumDoctor
info AppiumDoctor Bye! Run appium-doctor again when all manual fixes have 
been applied!
info AppiumDoctor

从上述警告中,我了解到我需要安装opencv4nodejs。所以在cmd,我输入了"npm i opencv4nodejs“

所以,当我进入,我还有一个问题,我无法理解,因为它是告诉我安装python,我不知道为什么?因为我使用javascript编写代码,所以需要安装python

代码语言:javascript
复制
> heapdump@0.3.12 install C:\Users\Dbaux\node_modules\heapdump
> node-gyp rebuild


C:\Users\Dbaux\node_modules\heapdump>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
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 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 10.0.17134
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:\Users\Dbaux\node_modules\heapdump
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

> opencv-build@0.0.15 install C:\Users\Dbaux\node_modules\opencv-build
> node ./install.js

info install if you want to use an own OpenCV installation set 
OPENCV4NODEJS_DISABLE_AUTOBUILD
info install library dir does not exist: C:\Users\Dbaux\node_modules\opencv-build\opencv\build\lib\Release
info install running install script...
ERR! Error: Command failed: cmake --version
'cmake' is not recognized as an internal or external command,
operable program or batch file.

npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Dbaux\package.json'
npm WARN Dbaux No description
npm WARN Dbaux No repository field.
npm WARN Dbaux No README data
npm WARN Dbaux No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.1 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: heapdump@0.3.12 (node_modules\heapdump):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: heapdump@0.3.12 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! opencv-build@0.0.15 install: `node ./install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opencv-build@0.0.15 install 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\Dbaux\AppData\Roaming\npm-cache\_logs\2018-12- 
26T09_56_55_948Z-debug.log

请让我知道我所跟踪的文件是否正确。

EN

回答 1

Stack Exchange QA用户

发布于 2018-12-27 08:06:40

在运行“appium- at”之后查看您的错误

  • 我会说,请从您正在使用的所有路径中删除空白。必填
  • 我在前面提到过此链接,以便正确安装JavaScript。所有的事情都开始为我工作!

万事如意!

票数 1
EN
页面原文内容由Stack Exchange QA提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://sqa.stackexchange.com/questions/37034

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档