Hello all,
I hope someone can help me. I would like to install the object recognition node-red-contrib-tfjs-coco-ssd on my RaspberryMatic. Unfortunately it does not install correctly. During the installation I get the following error.
root@homematic-raspi:/usr/local# cd /usr/local/addons/redmatic/var
root@homematic-raspi:/usr/local/addons/redmatic/var# npm i node-red-contrib-tfjs
-coco-ssd
> @tensorflow/tfjs-node@1.4.0 install /usr/local/addons/redmatic/var/node_module s/@tensorflow/tfjs-node
> node scripts/install.js
CPU-linux-1.4.0.tar.gz
* Building TensorFlow Node.js bindings
node-pre-gyp install failed with error: Error: Command failed: node-pre-gyp inst all --fallback-to-build
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://storage.googleapis.com/tf-buil ds/pre-built-binary/napi-v5/1.4.0/CPU-linux-1.4.0.tar.gz
node-pre-gyp WARN Pre-built binaries not found for @tensorflow/tfjs-node@1.4.0 a nd node@12.18.4 (node-v72 ABI, glibc) (falling back to source compile with node- gyp)
gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if "python2" can be used
gyp ERR! find Python - "python2" is not in PATH or produced an error
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
gyp ERR! find Python (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack at PythonFinder.fail (/usr/lib/node_modules/npm/node_modules/ node-gyp/lib/find-python.js:307:47)
gyp ERR! stack at PythonFinder.runChecks (/usr/lib/node_modules/npm/node_mod ules/node-gyp/lib/find-python.js:136:21)
gyp ERR! stack at PythonFinder.<anonymous> (/usr/lib/node_modules/npm/node_m odules/node-gyp/lib/find-python.js:179:16)
gyp ERR! stack at PythonFinder.execFileCallback (/usr/lib/node_modules/npm/n ode_modules/node-gyp/lib/find-python.js:271:16)
gyp ERR! stack at exithandler (child_process.js:310:5)
gyp ERR! stack at ChildProcess.errorhandler (child_process.js:322:5)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces s.js:273:12)
gyp ERR! stack at onErrorNT (internal/child_process.js:469:16)
gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js :84:21)
gyp ERR! System Linux 5.4.77
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gy p/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/addons /redmatic/var/node_modules/@tensorflow/tfjs-node/lib/napi-v5/tfjs_binding.node" "--module_name=tfjs_binding" "--module_path=/usr/local/addons/redmatic/var/node_ modules/@tensorflow/tfjs-node/lib/napi-v5" "--napi_version=6" "--node_abi_napi=n api" "--napi_build_version=5" "--node_napi_label=napi-v5"
gyp ERR! cwd /usr/local/addons/redmatic/var/node_modules/@tensorflow/tfjs-node
gyp ERR! node -v v12.18.4
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_mo dules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build -- module=/usr/local/addons/redmatic/var/node_modules/@tensorflow/tfjs-node/lib/nap i-v5/tfjs_binding.node --module_name=tfjs_binding --module_path=/usr/local/addon s/redmatic/var/node_modules/@tensorflow/tfjs-node/lib/napi-v5 --napi_version=6 - -node_abi_napi=napi --napi_build_version=5 --node_napi_label=napi-v5' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/addons/redma tic/var/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/chi ld_process.js:286:5)
node-pre-gyp ERR! System Linux 5.4.77
node-pre-gyp ERR! command "/usr/bin/node" "/usr/local/addons/redmatic/var/node_m odules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/addons/redmatic/var/node_modules/@tensorflow/tf js-node
node-pre-gyp ERR! node -v v12.18.4
node-pre-gyp ERR! node-pre-gyp -v v0.13.0
node-pre-gyp ERR! not ok
> node-red-contrib-tfjs-coco-ssd@0.5.5 postinstall /usr/local/addons/redmatic/va r/node_modules/node-red-contrib-tfjs-coco-ssd
> node fixwindll.js
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.
+ node-red-contrib-tfjs-coco-ssd@0.5.5
updated 1 package, moved 156 packages and audited 442 packages in 31.154s
23 packages are looking for funding
run `npm fund` for details
found 4 low severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
┌───────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) /root/.config │
└───────────────────────────────────────────────────┘
root@homematic-raspi:/usr/local/addons/redmatic/var#
It seems clear that Python is missing. Unfortunately, I don't know how to get Python to work on my RaspberryMatic
It is still the last piece of the puzzle to get my monitoring system working. I hope someone can help.
Thanks at all