# Не могу установить ноду node-red-node-serialport

**URL:** <https://support.wirenboard.com/t/ne-mogu-ustanovit-nodu-node-red-node-serialport/11644>\
**Category:** Особые запросы\
**Tags:** node-red, python, установка\
**Created:** [June 19, 2022, 12:12pm UTC](https://support.wirenboard.com/t/ne-mogu-ustanovit-nodu-node-red-node-serialport/11644 "2022-06-19T12:12:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![azsochi](https://support.wirenboard.com/user_avatar/support.wirenboard.com/azsochi/32/22317_2.png) [@azsochi](https://support.wirenboard.com/u/azsochi)\
**Post date:** [June 19, 2022, 12:12pm UTC](https://support.wirenboard.com/t/ne-mogu-ustanovit-nodu-node-red-node-serialport/11644/1 "2022-06-19T12:12:29Z")

</div>

При попытке установить ноду выдает:

> npm ERR! code 1  
> npm ERR! path /mnt/data/root/node\_modules/@serialport/bindings-cpp  
> npm ERR! command failed  
> npm ERR! command sh -c node-gyp-build  
> npm ERR! gyp info it worked if it ends with ok  
> npm ERR! gyp info using node-gyp@9.0.0  
> npm ERR! gyp info using node@14.19.3 | linux | arm  
> npm ERR! gyp ERR! find Python  
> npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration  
> 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 - executable path is “/usr/bin/python3”  
> npm ERR! gyp ERR! find Python - version is “3.5.3”  
> npm ERR! gyp ERR! find Python - version is 3.5.3 - should be \>=3.6.0  
> npm ERR! gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED  
> npm ERR! gyp ERR! find Python checking if “python” can be used  
> npm ERR! gyp ERR! find Python - executable path is “/usr/bin/python”  
> npm ERR! gyp ERR! find Python - version is “2.7.13”  
> npm ERR! gyp ERR! find Python - version is 2.7.13 - should be \>=3.6.0  
> npm ERR! gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED  
> 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 [GitHub - nodejs/node-gyp: Node.js native addon build tool](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 (/mnt/data/usr/local/lib/node\_modules/npm/node\_modules/node-gyp/lib/find-python.js:330:47)  
> npm ERR! gyp ERR! stack at PythonFinder.runChecks (/mnt/data/usr/local/lib/node\_modules/npm/node\_modules/node-gyp/lib/find-python.js:159:21)  
> npm ERR! gyp ERR! stack at PythonFinder. (/mnt/data/usr/local/lib/node\_modules/npm/node\_modules/node-gyp/lib/find-python.js:266:16)  
> npm ERR! gyp ERR! stack at PythonFinder.execFileCallback (/mnt/data/usr/local/lib/node\_modules/npm/node\_modules/node-gyp/lib/find-python.js:297:7)  
> npm ERR! gyp ERR! stack at ChildProcess.exithandler (child\_process.js:374:7)  
> npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:400:28)  
> npm ERR! gyp ERR! stack at maybeClose (internal/child\_process.js:1088:16)  
> npm ERR! gyp ERR! stack at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:296:5)  
> npm ERR! gyp ERR! System Linux 5.10.35-wb111  
> npm ERR! gyp ERR! command “/usr/local/bin/node” “/mnt/data/usr/local/lib/node\_modules/npm/node\_modules/node-gyp/bin/node-gyp.js” “rebuild”  
> npm ERR! gyp ERR! cwd /mnt/data/root/node\_modules/@serialport/bindings-cpp  
> npm ERR! gyp ERR! node -v v14.19.3  
> npm ERR! gyp ERR! node-gyp -v v9.0.0  
> npm ERR! gyp ERR! not ok  
> npm ERR! A complete log of this run can be found in:  
> npm ERR! /root/.npm/\_logs/2022-06-19T12\_03\_00\_240Z-debug-0.log

Я так понимаю, не устраивает версия python3? Как можно решить эту проблему? Очень нужен доступ к GSM модему из Node-red

---

<div class="post-metadata">

**Author:** ![Explorerol](https://avatars.discourse-cdn.com/v2/letter/e/7ab992/32.png) [@Explorerol](https://support.wirenboard.com/u/Explorerol)\
**Post date:** [June 20, 2022, 9:19am UTC](https://support.wirenboard.com/t/ne-mogu-ustanovit-nodu-node-red-node-serialport/11644/2 "2022-06-20T09:19:32Z")

</div>

Здравствуйте!

> [@azsochi](#):
>
> npm ERR! gyp ERR! find Python - version is 3.5.3 - should be \>=3.6.0

Да, версия python требуется 3.6 или выше.  
Как вариант установить дополнительно еще и более новую версию. Похожее обсуждение было здесь:

> [@Установка python 3 выше 3.5.3](https://support.wirenboard.com/t/ustanovka-python-3-vyshe-3-5-3/10871/5):
>
> Вообще, обновлять системный питон на версию, отличную от предусмотренной мейнтейнерами - дело весьма рисковое, полного списка того, что может пойти не так, вам не даст никто. Я так полагаю, вы для HA свежий питон получить хотите. Я пробовал недавно 3.10 из исходников прямо на вайрене собирать, но для сборки там не хватает место, даже на /mnt/data. Либо подключайте внешнюю флешку или диск, временно переносите туда /tmp и собирайте на вайрене, либо через кросс-компиляцию собирайте на компе. Ставь…

---

<div class="post-metadata">

**Author:** ![azsochi](https://support.wirenboard.com/user_avatar/support.wirenboard.com/azsochi/32/22317_2.png) [@azsochi](https://support.wirenboard.com/u/azsochi)\
**Post date:** [June 20, 2022, 10:14am UTC](https://support.wirenboard.com/t/ne-mogu-ustanovit-nodu-node-red-node-serialport/11644/4 "2022-06-20T10:14:29Z")

</div>

Я не очень силен в сборке приложений из исходников, можете подсказать, если я поставлю по [этой инструкции](https://docs-python.ru/tutorial/ustanovka-python/ustanovka-ubuntu-debian-ishodnikov/), я не сломаю родной python3?  
Я вообще не очень понимаю, как потом будет делаться выбор, в каком случае будет использоваться системный питон, а в каком собранный мной?

---

<div class="post-metadata">

**Author:** ![BrainRoot](https://avatars.discourse-cdn.com/v2/letter/b/c2a13f/32.png) [@BrainRoot](https://support.wirenboard.com/u/BrainRoot)\
**Post date:** [June 20, 2022, 1:03pm UTC](https://support.wirenboard.com/t/ne-mogu-ustanovit-nodu-node-red-node-serialport/11644/5 "2022-06-20T13:03:33Z")

</div>

Добрый день.  
В системе установлен питон 2.7 и он используется в системных скриптах. Простая установка **другой версии** - сломает часть функционала.  
Но почему не хотите добавить в конфиг другую, требуемую, версию как рекомендуется:

> [@azsochi](#):
>
> ```auto
> 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
> 
> ```

```auto
cd /usr/src
wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz 
tar xvf Python-3.6.4.tgz
cd Python-3.6.4
./configure --enable-optimizations
make -j8

```

Естественно делать лучше не на контроллере, (место, медленно).

> [@azsochi](#):
>
> Я вообще не очень понимаю, как потом будет делаться выбор, в каком случае будет использоваться системный питон, а в каком собранный мной?

Неплохо почитать для общей информации тут: [Как переключить дефолтную версию Python в Debian 9](https://www.scorp13.com/workflow/kak-pereklyuchit-defoltnuyu-versiyu-python-v-debian-9.html)  
Но вкратце симлинк /usr/bin/python долже указывать на /usr/bin/python2.7

---

<div class="post-metadata">

**Author:** ![system](https://support.wirenboard.com/uploads/default/original/2X/5/5ac90dc8a7bdff486d3494a19ec6aaa6f6cc5d36.png) [@system](https://support.wirenboard.com/u/system)\
**Post date:** [June 28, 2022, 6:43am UTC](https://support.wirenboard.com/t/ne-mogu-ustanovit-nodu-node-red-node-serialport/11644/6 "2022-06-28T06:43:18Z")

</div>

Эта тема была автоматически закрыта через 7 дней после последнего ответа. В ней больше нельзя отвечать.
