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.