Unable to install node-red-contrib-zigbee on node-red Home assisten

I have a raspberry pi where i have installed home assistant as a OS. On the ha i have installed node-red and am trying to it with my zigbee devices. However when every i try to install: node-red-contrib-zigbee i keep on getting this error:

-----------------------------------------------------------
2023-10-31T18:37:40.695Z Install : node-red-contrib-zigbee 0.21.0

2023-10-31T18:37:41.840Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict [email protected]
2023-10-31T18:37:43.180Z [err] npm
2023-10-31T18:37:43.183Z [err]  WARN config
2023-10-31T18:37:43.183Z [err]  production Use `--omit=dev` instead.
2023-10-31T18:38:00.069Z [err] npm
2023-10-31T18:38:00.069Z [err]  WARN deprecated [email protected]: Please consider using https://github.com/visjs
2023-10-31T18:38:01.788Z [err] npm
2023-10-31T18:38:01.788Z [err]  ERR! code 1
2023-10-31T18:38:01.789Z [err] npm 
2023-10-31T18:38:01.789Z [err] ERR! path /config/node-red/node_modules/zigbee-herdsman/node_modules/@serialport/bindings
2023-10-31T18:38:01.796Z [err] npm 
2023-10-31T18:38:01.796Z [err] ERR! command failed
2023-10-31T18:38:01.796Z [err] npm ERR!
2023-10-31T18:38:01.796Z [err]  command sh -c node-gyp rebuild
2023-10-31T18:38:01.797Z [err] npm 
2023-10-31T18:38:01.797Z [err] ERR! gyp info it worked if it ends with ok
2023-10-31T18:38:01.797Z [err] npm ERR! gyp info using [email protected]
2023-10-31T18:38:01.797Z [err] npm ERR! gyp info using [email protected] | linux | arm64
2023-10-31T18:38:01.797Z [err] npm 
2023-10-31T18:38:01.797Z [err] ERR! gyp ERR! find Python 
2023-10-31T18:38:01.797Z [err] npm
2023-10-31T18:38:01.797Z [err]  ERR!
2023-10-31T18:38:01.797Z [err]  gyp ERR! find Python checking Python explicitly set from command line or npm configuration
2023-10-31T18:38:01.798Z [err] npm ERR! gyp ERR! find Python - "--python=" or "npm config get python" is "/usr/bin/python3"
2023-10-31T18:38:01.798Z [err] npm
2023-10-31T18:38:01.798Z [err]  ERR! gyp ERR! find Python - "/usr/bin/python3" is not in PATH or produced an error
2023-10-31T18:38:01.798Z [err] npm
2023-10-31T18:38:01.798Z [err]  ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
2023-10-31T18:38:01.798Z [err] npm 
2023-10-31T18:38:01.798Z [err] ERR! gyp ERR! find Python checking if "python3" can be used
2023-10-31T18:38:01.798Z [err] npm 
2023-10-31T18:38:01.798Z [err] ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
2023-10-31T18:38:01.798Z [err] npm ERR!
2023-10-31T18:38:01.798Z [err]  gyp ERR! find Python checking if "python" can be used
2023-10-31T18:38:01.798Z [err] npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
2023-10-31T18:38:01.798Z [err] npm ERR! gyp ERR! find Python 
2023-10-31T18:38:01.798Z [err] npm ERR! gyp ERR! find Python **********************************************************
2023-10-31T18:38:01.798Z [err] npm
2023-10-31T18:38:01.799Z [err]  ERR! gyp ERR! find Python You need to install the latest version of Python.
2023-10-31T18:38:01.799Z [err] npm 
2023-10-31T18:38:01.799Z [err] ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
2023-10-31T18:38:01.799Z [err] npm 
2023-10-31T18:38:01.799Z [err] ERR! gyp ERR! find Python you can try one of the following options:
2023-10-31T18:38:01.799Z [err] npm ERR!
2023-10-31T18:38:01.799Z [err]  gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
2023-10-31T18:38:01.799Z [err] npm ERR!
2023-10-31T18:38:01.799Z [err]  gyp ERR! find Python   (accepted by both node-gyp and npm)
2023-10-31T18:38:01.799Z [err] npm ERR!
2023-10-31T18:38:01.801Z [err]  gyp ERR! find Python - Set the environment variable PYTHON
2023-10-31T18:38:01.801Z [err] npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
2023-10-31T18:38:01.801Z [err] npm ERR! gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
2023-10-31T18:38:01.801Z [err] npm ERR! gyp ERR! find Python For more information consult the documentation at:
2023-10-31T18:38:01.801Z [err] npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
2023-10-31T18:38:01.801Z [err] npm ERR! gyp ERR! find Python **********************************************************
2023-10-31T18:38:01.801Z [err] npm ERR! gyp ERR! find Python 
2023-10-31T18:38:01.801Z [err] npm ERR! gyp ERR! configure error 
2023-10-31T18:38:01.801Z [err] npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
2023-10-31T18:38:01.801Z [err] npm ERR! gyp ERR! stack     at PythonFinder.fail (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:330:47)
2023-10-31T18:38:01.801Z [err] npm ERR! gyp ERR! stack     at PythonFinder.runChecks (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:159:21)
2023-10-31T18:38:01.801Z [err] npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:202:16)
2023-10-31T18:38:01.801Z [err] npm ERR!
2023-10-31T18:38:01.801Z [err]  gyp ERR! stack     at PythonFinder.execFileCallback (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:294:16)
2023-10-31T18:38:01.801Z [err] npm ERR! gyp ERR! stack     at exithandler (node:child_process:430:5)
2023-10-31T18:38:01.801Z [err] npm ERR! gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:442:5)
2023-10-31T18:38:01.801Z [err] npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:517:28)
2023-10-31T18:38:01.801Z [err] npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:290:12)
2023-10-31T18:38:01.801Z [err] npm ERR!
2023-10-31T18:38:01.801Z [err]  gyp ERR! stack     at onErrorNT (node:internal/child_process:477:16)
2023-10-31T18:38:01.801Z [err] npm ERR! gyp ERR! stack     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
2023-10-31T18:38:01.801Z [err] npm ERR! gyp ERR! System Linux 6.1.21-v8
2023-10-31T18:38:01.801Z [err] npm
2023-10-31T18:38:01.802Z [err]  ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2023-10-31T18:38:01.802Z [err] npm ERR!
2023-10-31T18:38:01.802Z [err]  gyp ERR! cwd /config/node-red/node_modules/zigbee-herdsman/node_modules/@serialport/bindings
2023-10-31T18:38:01.802Z [err] npm ERR!
2023-10-31T18:38:01.802Z [err]  gyp ERR! node -v v18.18.2
2023-10-31T18:38:01.802Z [err] npm ERR! gyp ERR! node-gyp -v v9.3.1
2023-10-31T18:38:01.802Z [err] npm ERR! gyp ERR! not ok
2023-10-31T18:38:01.811Z [err] 
2023-10-31T18:38:01.811Z [err] npm 
2023-10-31T18:38:01.811Z [err] ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-10-31T18_37_43_047Z-debug-0.log
2023-10-31T18:38:01.856Z rc=1

I tried to see if i could install python but i was unable to do this. i tried npm commands but i keep on getting this as response:
zsh: command not found: node
zsh: command not found: npm

does someone know how to solve this?

What is it you’re trying to do with this NR addon? Normally you would use zigbee devices via an addon/integration for HA and then control the exposed entities in NR. For example ZHA or Z2M. That addon is expecting Python to be installed, and it’s not there in the container used by the NR addon (and that does not mean you should install it).

basically i have a smart socket and a smart temperature sensor. The socket has to turn on when the temperature is at a certain. So i thought that i could do this using NR. but i you know how to do this in ZHA i would like to know how to do this. This is the first time i have to this up and its for a school assignment and we have to do this without any explanation. Just a couple of website links and that is all

You set up the devices in HA. Given they’re zigbee devices, you would set up the zigbee hub (aka coordinator) in HA. If you plug the hub into the Pi and go into “Settings > Devices & Services” it may automatically see it and prompt you to set it up with ZHA. If not, click on “Add integration” and search for ZHA (zigbee home automation).

Once the devices are set up with the hub (which varies for each hub brand), you should see the devices automatically in HA under the integration. Then in Node Red you can use the Home Assistant nodes to control those devices.