# Error installing an modbus-extension

**URL:** <https://discourse.nodered.org/t/error-installing-an-modbus-extension/74372>\
**Category:** Dashboard\
**Tags:** modbus\
**Created:** [29 January 2023 19:21 UTC](https://discourse.nodered.org/t/error-installing-an-modbus-extension/74372 "2023-01-29T19:21:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![spunky1a](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/spunky1a/32/74827_2.png) [@spunky1a](https://discourse.nodered.org/u/spunky1a)\
**Post date:** [29 January 2023 19:21 UTC](https://discourse.nodered.org/t/error-installing-an-modbus-extension/74372/1 "2023-01-29T19:21:05Z")

</div>

Hello, I wanted to install a modbus server, but I keep getting an error message. Can someone tell me where the problem is or if something else needs to be installed?

i use windows 10 with io-broker and node-red.

node-red-contrib-modbus-api 0.3.0

> **Summary**
>
> > * * *
> > 
> > 2023-01-29T19:03:59.257Z Installieren : node-red-contrib-modbus-api 0.3.0
> > 
> > 2023-01-29T19:03:59.577Z npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-modbus-api@0.3.0
> > 
> > 2023-01-29T19:04:00.453Z [err] npm
> > 
> > 2023-01-29T19:04:00.454Z [err] WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
> > 
> > 2023-01-29T19:04:01.223Z [err] npm
> > 
> > 2023-01-29T19:04:01.224Z [err]
> > 
> > 2023-01-29T19:04:01.224Z [err] WARN config production Use `--omit=dev` instead.
> > 
> > 2023-01-29T19:04:11.430Z [err] npm
> > 
> > 2023-01-29T19:04:11.430Z [err] ERR! code 1
> > 
> > 2023-01-29T19:04:11.430Z [err] npm
> > 
> > 2023-01-29T19:04:11.430Z [err] ERR! path C:\Program Files\ioBroker\node\_modules\iobroker.node-red\userdata\node\_modules@serialport\bindings
> > 
> > 2023-01-29T19:04:11.432Z [err] npm ERR! command failed
> > 
> > 2023-01-29T19:04:11.432Z [err] npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
> > 
> > 2023-01-29T19:04:11.432Z [err] npm
> > 
> > 2023-01-29T19:04:11.432Z [err] ERR! gyp info it worked if it ends with ok
> > 
> > 2023-01-29T19:04:11.432Z [err] npm ERR! gyp info using node-gyp@9.0.0
> > 
> > 2023-01-29T19:04:11.432Z [err] npm ERR! gyp info using node@16.15.1 | win32 | x64
> > 
> > 2023-01-29T19:04:11.432Z [err] npm
> > 
> > 2023-01-29T19:04:11.432Z [err] ERR! gyp ERR! find Python
> > 
> > 2023-01-29T19:04:11.432Z [err] npm
> > 
> > 2023-01-29T19:04:11.432Z [err] ERR!
> > 
> > 2023-01-29T19:04:11.433Z [err] gyp ERR! find Python Python is not set from command line or npm configuration
> > 
> > 2023-01-29T19:04:11.433Z [err] npm
> > 
> > 2023-01-29T19:04:11.433Z [err] ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
> > 
> > 2023-01-29T19:04:11.433Z [err] npm
> > 
> > 2023-01-29T19:04:11.433Z [err] ERR! gyp ERR! find Python checking if "python3" can be used
> > 
> > 2023-01-29T19:04:11.433Z [err] npm
> > 
> > 2023-01-29T19:04:11.433Z [err] ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.433Z [err] gyp ERR! find Python checking if "python" can be used
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.433Z [err] gyp ERR! find Python - "python" is not in PATH or produced an error
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR! gyp ERR! find Python checking if Python is C:\WINDOWS\system32\config\systemprofile\AppData\Local\Programs\Python\Python39\python.exe
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR! gyp ERR! find Python - "C:\WINDOWS\system32\config\systemprofile\AppData\Local\Programs\Python\Python39\python.exe" could not be run
> > 
> > 2023-01-29T19:04:11.433Z [err] npm
> > 
> > 2023-01-29T19:04:11.433Z [err] ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39\python.exe
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.433Z [err] gyp ERR! find Python - "C:\Program Files\Python39\python.exe" could not be run
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR! gyp ERR! find Python checking if Python is C:\WINDOWS\system32\config\systemprofile\AppData\Local\Programs\Python\Python39-32\python.exe
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR! gyp ERR! find Python - "C:\WINDOWS\system32\config\systemprofile\AppData\Local\Programs\Python\Python39-32\python.exe" could not be run
> > 
> > 2023-01-29T19:04:11.433Z [err] npm
> > 
> > 2023-01-29T19:04:11.433Z [err] ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39-32\python.exe
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.433Z [err] gyp ERR! find Python - "C:\Program Files\Python39-32\python.exe" could not be run
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.433Z [err] gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python39-32\python.exe
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python39-32\python.exe" could not be run
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR! gyp ERR! find Python checking if Python is C:\WINDOWS\system32\config\systemprofile\AppData\Local\Programs\Python\Python38\python.exe
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.433Z [err] gyp ERR! find Python - "C:\WINDOWS\system32\config\systemprofile\AppData\Local\Programs\Python\Python38\python.exe" could not be run
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38\python.exe
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR! gyp ERR! find Python - "C:\Program Files\Python38\python.exe" could not be run
> > 
> > 2023-01-29T19:04:11.433Z [err] npm
> > 
> > 2023-01-29T19:04:11.433Z [err] ERR! gyp ERR! find Python checking if Python is C:\WINDOWS\system32\config\systemprofile\AppData\Local\Programs\Python\Python38-32\python.exe
> > 
> > 2023-01-29T19:04:11.433Z [err] npm
> > 
> > 2023-01-29T19:04:11.433Z [err] ERR! gyp ERR! find Python - "C:\WINDOWS\system32\config\systemprofile\AppData\Local\Programs\Python\Python38-32\python.exe" could not be run
> > 
> > 2023-01-29T19:04:11.433Z [err] npm
> > 
> > 2023-01-29T19:04:11.433Z [err] ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38-32\python.exe
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.433Z [err] gyp ERR! find Python - "C:\Program Files\Python38-32\python.exe" could not be run
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python38-32\python.exe
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python38-32\python.exe" could not be run
> > 
> > 2023-01-29T19:04:11.433Z [err] npm
> > 
> > 2023-01-29T19:04:11.433Z [err] ERR! gyp ERR! find Python checking if Python is C:\WINDOWS\system32\config\systemprofile\AppData\Local\Programs\Python\Python37\python.exe
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.433Z [err] gyp ERR! find Python - "C:\WINDOWS\system32\config\systemprofile\AppData\Local\Programs\Python\Python37\python.exe" could not be run
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.433Z [err] gyp ERR! find Python checking if Python is C:\Program Files\Python37\python.exe
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR! gyp ERR! find Python - "C:\Program Files\Python37\python.exe" could not be run
> > 
> > 2023-01-29T19:04:11.433Z [err] npm
> > 
> > 2023-01-29T19:04:11.433Z [err] ERR!
> > 
> > 2023-01-29T19:04:11.433Z [err] gyp ERR! find Python checking if Python is C:\WINDOWS\system32\config\systemprofile\AppData\Local\Programs\Python\Python37-32\python.exe
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR! gyp ERR! find Python - "C:\WINDOWS\system32\config\systemprofile\AppData\Local\Programs\Python\Python37-32\python.exe" could not be run
> > 
> > 2023-01-29T19:04:11.433Z [err] npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37-32\python.exe
> > 
> > 2023-01-29T19:04:11.433Z [err] npm
> > 
> > 2023-01-29T19:04:11.433Z [err] ERR!
> > 
> > 2023-01-29T19:04:11.434Z [err] gyp ERR! find Python - "C:\Program Files\Python37-32\python.exe" could not be run
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python37-32\python.exe
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.434Z [err] gyp ERR! find Python - "C:\Program Files (x86)\Python37-32\python.exe" could not be run
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.434Z [err] gyp ERR! find Python checking if Python is C:\WINDOWS\system32\config\systemprofile\AppData\Local\Programs\Python\Python36\python.exe
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR! gyp ERR! find Python - "C:\WINDOWS\system32\config\systemprofile\AppData\Local\Programs\Python\Python36\python.exe" could not be run
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.434Z [err] gyp ERR! find Python checking if Python is C:\Program Files\Python36\python.exe
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR! gyp ERR! find Python - "C:\Program Files\Python36\python.exe" could not be run
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR! gyp ERR! find Python checking if Python is C:\WINDOWS\system32\config\systemprofile\AppData\Local\Programs\Python\Python36-32\python.exe
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR! gyp ERR! find Python - "C:\WINDOWS\system32\config\systemprofile\AppData\Local\Programs\Python\Python36-32\python.exe" could not be run
> > 
> > 2023-01-29T19:04:11.434Z [err] npm
> > 
> > 2023-01-29T19:04:11.434Z [err] ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36-32\python.exe
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR! gyp ERR! find Python - "C:\Program Files\Python36-32\python.exe" could not be run
> > 
> > 2023-01-29T19:04:11.434Z [err] npm
> > 
> > 2023-01-29T19:04:11.434Z [err] ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python36-32\python.exe
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python36-32\python.exe" could not be run
> > 
> > 2023-01-29T19:04:11.434Z [err] npm
> > 
> > 2023-01-29T19:04:11.434Z [err] ERR! gyp ERR! find Python checking if the py launcher can be used to find Python 3
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.434Z [err] gyp ERR! find Python - "py.exe" is not in PATH or produced an error
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.434Z [err] gyp ERR! find Python
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR! gyp ERR! find Python \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> > 
> > 2023-01-29T19:04:11.434Z [err] npm
> > 
> > 2023-01-29T19:04:11.434Z [err] ERR!
> > 
> > 2023-01-29T19:04:11.434Z [err] gyp ERR! find Python You need to install the latest version of Python.
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.434Z [err] gyp ERR! find Python you can try one of the following options:
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR! gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR! gyp ERR! find Python (accepted by both node-gyp and npm)
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.434Z [err] gyp ERR! find Python - Set the environment variable PYTHON
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR! gyp ERR! find Python npm config set python "C:\Path\To\python.exe"
> > 
> > 2023-01-29T19:04:11.434Z [err] npm
> > 
> > 2023-01-29T19:04:11.434Z [err] ERR! gyp ERR! find Python For more information consult the documentation at:
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.434Z [err] gyp ERR! find Python [GitHub - nodejs/node-gyp: Node.js native addon build tool](https://github.com/nodejs/node-gyp#installation)
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.434Z [err] gyp ERR! find Python \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR! gyp ERR! find Python
> > 
> > 2023-01-29T19:04:11.434Z [err] npm
> > 
> > 2023-01-29T19:04:11.434Z [err] ERR! gyp ERR! configure error
> > 
> > 2023-01-29T19:04:11.434Z [err] npm
> > 
> > 2023-01-29T19:04:11.434Z [err] ERR! gyp ERR! stack Error: Could not find any Python installation to use
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.434Z [err] gyp ERR! stack at PythonFinder.fail (C:\Program Files\nodejs\node\_modules\npm\node\_modules\node-gyp\lib\find-python.js:330:47)
> > 
> > 2023-01-29T19:04:11.434Z [err] npm
> > 
> > 2023-01-29T19:04:11.434Z [err] ERR! gyp ERR! stack at PythonFinder.runChecks (C:\Program Files\nodejs\node\_modules\npm\node\_modules\node-gyp\lib\find-python.js:159:21)
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.434Z [err] gyp ERR! stack at PythonFinder. (C:\Program Files\nodejs\node\_modules\npm\node\_modules\node-gyp\lib\find-python.js:228:18)
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.434Z [err] gyp ERR! stack at PythonFinder.execFileCallback (C:\Program Files\nodejs\node\_modules\npm\node\_modules\node-gyp\lib\find-python.js:294:16)
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR! gyp ERR! stack at exithandler (node:child\_process:406:5)
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR! gyp ERR! stack at ChildProcess.errorhandler (node:child\_process:418:5)
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28)
> > 
> > 2023-01-29T19:04:11.434Z [err] npm
> > 
> > 2023-01-29T19:04:11.434Z [err] ERR!
> > 
> > 2023-01-29T19:04:11.434Z [err] gyp ERR! stack at Process.ChildProcess.\_handle.onexit (node:internal/child\_process:289:12)
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.434Z [err] gyp ERR! stack at onErrorNT (node:internal/child\_process:478:16)
> > 
> > 2023-01-29T19:04:11.434Z [err] npm ERR! gyp ERR! stack at processTicksAndRejections (node:internal/process/task\_queues:83:21)
> > 
> > 2023-01-29T19:04:11.435Z [err] npm ERR! gyp ERR! System Windows\_NT 10.0.19045
> > 
> > 2023-01-29T19:04:11.435Z [err] npm
> > 
> > 2023-01-29T19:04:11.435Z [err] ERR! 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"
> > 
> > 2023-01-29T19:04:11.435Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.435Z [err] gyp ERR! cwd C:\Program Files\ioBroker\node\_modules\iobroker.node-red\userdata\node\_modules@serialport\bindings
> > 
> > 2023-01-29T19:04:11.435Z [err] npm ERR! gyp ERR! node -v v16.15.1
> > 
> > 2023-01-29T19:04:11.435Z [err] npm ERR! gyp ERR! node-gyp -v v9.0.0
> > 
> > 2023-01-29T19:04:11.435Z [err] npm
> > 
> > 2023-01-29T19:04:11.435Z [err] ERR! gyp ERR! not ok
> > 
> > 2023-01-29T19:04:11.436Z [err]
> > 
> > 2023-01-29T19:04:11.436Z [err] npm
> > 
> > 2023-01-29T19:04:11.436Z [err] ERR! A complete log of this run can be found in:
> > 
> > 2023-01-29T19:04:11.436Z [err] npm ERR!
> > 
> > 2023-01-29T19:04:11.436Z [err] C:\WINDOWS\system32\config\systemprofile\AppData\Local\npm-cache\_logs\2023-01-29T19\_04\_01\_188Z-debug-0.log
> > 
> > 2023-01-29T19:04:11.453Z rc=1

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [29 January 2023 19:31 UTC](https://discourse.nodered.org/t/error-installing-an-modbus-extension/74372/2 "2023-01-29T19:31:44Z")

</div>

Hi @spunky1a

Welcome to the forums.

The module you are installing, requires the `serialport` package.  
this package needs 'building' - as its a native binary.

This requires python to be installed, but the build process cannot find python.  
The suggestion is to install python 3.8 for Windows to allow the build process to complete.

---

<div class="post-metadata">

**Author:** ![spunky1a](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/spunky1a/32/74827_2.png) [@spunky1a](https://discourse.nodered.org/u/spunky1a)\
**Post date:** [30 January 2023 07:12 UTC](https://discourse.nodered.org/t/error-installing-an-modbus-extension/74372/3 "2023-01-30T07:12:24Z")

</div>

ok thanks, i reinstalled python, the path wasn't set correctly, now it works 😀

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [1 March 2023 07:13 UTC](https://discourse.nodered.org/t/error-installing-an-modbus-extension/74372/4 "2023-03-01T07:13:20Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
