M-Bus biblioteka i brak Pythona

Witam
Potrzebuje zainstalować w nod-red biblioteke do obslugi Mbus ale wywala mi błąd że brak chyba Pythona… dodam że jestem zielony z tego. Jak mogę go doinstalować i gdzie???

-----------------------------------------------------------

2023-05-18T16:37:19.608Z Install : node-red-contrib-m-bus 3.0.0

2023-05-18T16:37:19.203Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-m-bus@3.0.0

2023-05-18T16:37:20.727Z [err] npm

2023-05-18T16:37:20.730Z [err]  WARN

2023-05-18T16:37:20.730Z [err]  config production Use `--omit=dev` instead.

2023-05-18T16:37:31.454Z [err] npm

2023-05-18T16:37:31.454Z [err]  ERR! code

2023-05-18T16:37:31.454Z [err]  1

2023-05-18T16:37:31.455Z [err] npm

2023-05-18T16:37:31.455Z [err]  ERR! path /config/node-red/node_modules/node-mbus

2023-05-18T16:37:31.463Z [err] npm

2023-05-18T16:37:31.463Z [err] ERR! command failed

2023-05-18T16:37:31.463Z [err] npm

2023-05-18T16:37:31.463Z [err] ERR! command sh -c node-gyp rebuild

2023-05-18T16:37:31.464Z [err] npm

2023-05-18T16:37:31.464Z [err] ERR! gyp info it worked if it ends with ok

2023-05-18T16:37:31.464Z [err] npm ERR!

2023-05-18T16:37:31.464Z [err]  gyp info using node-gyp@9.3.1

2023-05-18T16:37:31.464Z [err] npm

2023-05-18T16:37:31.464Z [err]  ERR! gyp info using node@18.16.0 | linux | arm64

2023-05-18T16:37:31.464Z [err] npm ERR!

2023-05-18T16:37:31.464Z [err]  gyp ERR! find Python

2023-05-18T16:37:31.464Z [err] npm

2023-05-18T16:37:31.464Z [err] ERR!

2023-05-18T16:37:31.465Z [err]  gyp ERR! find Python checking Python explicitly set from command line or npm configuration

2023-05-18T16:37:31.465Z [err] npm

2023-05-18T16:37:31.465Z [err]  ERR! gyp ERR! find Python - "--python=" or "npm config get python" is "/usr/bin/python3"

2023-05-18T16:37:31.465Z [err] npm ERR! gyp ERR! find Python - "/usr/bin/python3" is not in PATH or produced an error

2023-05-18T16:37:31.465Z [err] npm

2023-05-18T16:37:31.466Z [err] ERR! gyp ERR! find Python Python is not set from environment variable PYTHON

2023-05-18T16:37:31.466Z [err] npm

2023-05-18T16:37:31.466Z [err] ERR! gyp ERR! find Python checking if "python3" can be used

2023-05-18T16:37:31.466Z [err] npm

2023-05-18T16:37:31.466Z [err]  ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error

2023-05-18T16:37:31.466Z [err] npm ERR!

2023-05-18T16:37:31.466Z [err]  gyp ERR! find Python checking if "python" can be used

2023-05-18T16:37:31.466Z [err] npm

2023-05-18T16:37:31.466Z [err] ERR! gyp ERR! find Python - "python" is not in PATH or produced an error

2023-05-18T16:37:31.466Z [err] npm

2023-05-18T16:37:31.466Z [err]  ERR!

2023-05-18T16:37:31.466Z [err]  gyp ERR! find Python

2023-05-18T16:37:31.466Z [err] npm ERR!

2023-05-18T16:37:31.467Z [err]  gyp ERR! find Python **********************************************************

2023-05-18T16:37:31.467Z [err] npm ERR! gyp ERR! find Python You need to install the latest version of Python.

2023-05-18T16:37:31.467Z [err] npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,

2023-05-18T16:37:31.467Z [err] npm

2023-05-18T16:37:31.468Z [err]  ERR! gyp ERR! find Python you can try one of the following options:

2023-05-18T16:37:31.468Z [err] npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"

2023-05-18T16:37:31.468Z [err] npm ERR! gyp ERR! find Python   (accepted by both node-gyp and npm)

2023-05-18T16:37:31.468Z [err] npm

2023-05-18T16:37:31.468Z [err]  ERR! gyp ERR! find Python - Set the environment variable PYTHON

2023-05-18T16:37:31.468Z [err] npm ERR!

2023-05-18T16:37:31.468Z [err]  gyp ERR! find Python - Set the npm configuration variable python:

2023-05-18T16:37:31.468Z [err] npm ERR!

2023-05-18T16:37:31.468Z [err]  gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"

2023-05-18T16:37:31.468Z [err] npm

2023-05-18T16:37:31.468Z [err] ERR! gyp ERR! find Python For more information consult the documentation at:

2023-05-18T16:37:31.468Z [err] npm

2023-05-18T16:37:31.469Z [err] ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation

2023-05-18T16:37:31.469Z [err] npm

2023-05-18T16:37:31.469Z [err]  ERR! gyp ERR! find Python **********************************************************

2023-05-18T16:37:31.469Z [err] npm

2023-05-18T16:37:31.469Z [err] ERR! gyp ERR! find Python

2023-05-18T16:37:31.469Z [err] npm

2023-05-18T16:37:31.469Z [err]  ERR! gyp ERR! configure error

2023-05-18T16:37:31.469Z [err] npm ERR!

2023-05-18T16:37:31.469Z [err]  gyp ERR! stack Error: Could not find any Python installation to use

2023-05-18T16:37:31.469Z [err] npm

2023-05-18T16:37:31.469Z [err] ERR! gyp ERR! stack     at PythonFinder.fail (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:330:47)

2023-05-18T16:37:31.469Z [err] npm

2023-05-18T16:37:31.469Z [err]  ERR!

2023-05-18T16:37:31.469Z [err]  gyp ERR! stack     at PythonFinder.runChecks (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:159:21)

2023-05-18T16:37:31.469Z [err] npm ERR!

2023-05-18T16:37:31.469Z [err]  gyp ERR! stack     at PythonFinder.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:202:16)

2023-05-18T16:37:31.469Z [err] npm

2023-05-18T16:37:31.469Z [err] ERR! gyp ERR! stack     at PythonFinder.execFileCallback (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:294:16)

2023-05-18T16:37:31.470Z [err] npm ERR!

2023-05-18T16:37:31.470Z [err]  gyp ERR! stack     at exithandler (node:child_process:427:5)

2023-05-18T16:37:31.470Z [err] npm

2023-05-18T16:37:31.470Z [err] ERR! gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:439:5)

2023-05-18T16:37:31.470Z [err] npm ERR!

2023-05-18T16:37:31.470Z [err]  gyp ERR! stack     at ChildProcess.emit (node:events:513:28)

2023-05-18T16:37:31.470Z [err] npm

2023-05-18T16:37:31.470Z [err] ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:289:12)

2023-05-18T16:37:31.470Z [err] npm

2023-05-18T16:37:31.470Z [err]  ERR! gyp ERR! stack     at onErrorNT (node:internal/child_process:476:16)

2023-05-18T16:37:31.470Z [err] npm ERR!

2023-05-18T16:37:31.470Z [err]  gyp ERR! stack     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

2023-05-18T16:37:31.470Z [err] npm

2023-05-18T16:37:31.470Z [err]  ERR! gyp ERR! System Linux 6.1.21-v8

2023-05-18T16:37:31.470Z [err] npm ERR!

2023-05-18T16:37:31.470Z [err]  gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

2023-05-18T16:37:31.470Z [err] npm

2023-05-18T16:37:31.471Z [err] ERR! gyp ERR! cwd /config/node-red/node_modules/node-mbus

2023-05-18T16:37:31.471Z [err] npm

2023-05-18T16:37:31.471Z [err]  ERR!

2023-05-18T16:37:31.471Z [err]  gyp ERR! node -v v18.16.0

2023-05-18T16:37:31.471Z [err] npm ERR!

2023-05-18T16:37:31.471Z [err]  gyp ERR! node-gyp -v v9.3.1

2023-05-18T16:37:31.471Z [err] npm

2023-05-18T16:37:31.471Z [err]  ERR! gyp ERR! not ok

2023-05-18T16:37:31.477Z [err]

2023-05-18T16:37:31.478Z [err] npm

2023-05-18T16:37:31.478Z [err] ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-05-18T16_37_20_607Z-debug-0.log

2023-05-18T16:37:31.526Z rc=1

Dodaj jeszcze na czym masz postawiony HA.

HA jest na raspberry pi 4 postawiony.

Instalujesz node-red-contrib-m-bus 3.0.0 z NR czy z konsoli ssh ?
Polecenia z konsoli ssh

which -a python3

Wynik:
root@debian:/# which -a python3
/usr/bin/python3
/bin/python3
root@debian:/#

polecenie:

 python3 --version

Wynik:
Python 3.9.2

Wymienione błędy mogą być też wynikiem braku odpowiednich uprawnień.

Można też spróbować instalacji z:

Dodając pakiet node-red-contrib-m-bus do ścieżki npm_packages* zapisać i restart NR.

Witam
Temat powrócił
z tym że po instalacjo na nowo HA i wpisaniu linijki w npm_packages nod red nie chce wstac i wywala błąd.

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting

-----------------------------------------------------------
 Add-on: Node-RED
 Flow-based programming for the Internet of Things
-----------------------------------------------------------
 Add-on version: 16.0.2
 You are running the latest version of this add-on.
 System: Home Assistant OS 11.2  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2023.12.1
 Home Assistant Supervisor: 2023.11.6
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-nginx: starting
s6-rc: info: service init-customizations: starting
[14:34:06] INFO: Starting installation of custom NPM/Node-RED packages...
s6-rc: info: service init-nginx successfully started
npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
npm WARN config `--include=optional` to include them.
npm WARN config 
npm WARN config     Default value does install optional deps unless otherwise omitted.
npm WARN config only Use `--omit=dev` to omit dev dependencies from the install.
npm ERR! code 1
npm ERR! path /opt/node_modules/node-mbus
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.3.1
npm ERR! gyp info using node@18.18.2 | linux | arm64
npm ERR! gyp ERR! find Python 
npm ERR! gyp ERR! find Python checking Python explicitly set from command line or npm configuration
npm ERR! gyp ERR! find Python - "--python=" or "npm config get python" is "/usr/bin/python3"
npm ERR! gyp ERR! find Python - "/usr/bin/python3" is not in PATH or produced an error
npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
npm ERR! gyp ERR! find Python checking if "python3" can be used
npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
npm ERR! gyp ERR! find Python checking if "python" can be used
npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
npm ERR! gyp ERR! find Python 
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python You need to install the latest version of Python.
npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
npm ERR! gyp ERR! find Python you can try one of the following options:
npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
npm ERR! gyp ERR! find Python   (accepted by both node-gyp and npm)
npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
npm ERR! gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
npm ERR! gyp ERR! find Python For more information consult the documentation at:
npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
npm ERR! gyp ERR! find Python **********************************************************
npm ERR! gyp ERR! find Python 
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
npm ERR! gyp ERR! stack     at PythonFinder.fail (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:330:47)
npm ERR! gyp ERR! stack     at PythonFinder.runChecks (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:159:21)
npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:202:16)
npm ERR! gyp ERR! stack     at PythonFinder.execFileCallback (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:294:16)
npm ERR! gyp ERR! stack     at exithandler (node:child_process:430:5)
npm ERR! gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:442:5)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:517:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! stack     at onErrorNT (node:internal/child_process:477:16)
npm ERR! gyp ERR! stack     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm ERR! gyp ERR! System Linux 6.1.58-haos-raspi
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /opt/node_modules/node-mbus
npm ERR! gyp ERR! node -v v18.18.2
npm ERR! gyp ERR! node-gyp -v v9.3.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-12-13T13_34_07_804Z-debug-0.log
[14:34:16] FATAL: Failed to install a specified npm package
s6-rc: warning: unable to start service init-customizations: command exited 1
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.
s6-rc: info: service init-nginx: stopping
s6-rc: info: service init-nginx successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped