CIMC中国智能制造挑战赛BBS

 立即注册
搜索
热搜: 活动 交友 discuz
查看: 4316|回复: 1

[软件使用求助] 安装node-red环境时报错问题

[复制链接]
  • TA的每日心情
    奋斗
    2021-7-31 14:48
  • 签到天数: 12 天

    连续签到: 1 天

    [LV.3]偶尔看看II

    发表于 2021-7-31 14:59:49 | 显示全部楼层 |阅读模式 来自 中国湖南
    问题内容:之前步骤检查过几遍没有问题,但运行指令安装node-red过程中会报错具体代码如下:
    Windows PowerShell
    版权所有 (C) Microsoft Corporation。保留所有权利。

    尝试新的跨平台 PowerShell https://aka.ms/pscore6

    PS C:\WINDOWS\system32> npm config set prefix "C:\Program Files\nodejs\node_global"
    PS C:\WINDOWS\system32> npm config set cache "C:\Program Files\nodejs\node_cache"
    PS C:\WINDOWS\system32> npm install -g express
    + express@4.17.1
    added 50 packages from 37 contributors in 28.272s
    PS C:\WINDOWS\system32> npm install -g --unsafe-perm node-red
    C:\Program Files\nodejs\node_global\node-red -> C:\Program Files\nodejs\node_global\node_modules\node-red\red.js
    C:\Program Files\nodejs\node_global\node-red-pi -> C:\Program Files\nodejs\node_global\node_modules\node-red\bin\node-red-pi

    > bcrypt@5.0.1 install C:\Program Files\nodejs\node_global\node_modules\node-red\node_modules\bcrypt
    > node-pre-gyp install --fallback-to-build

    node-pre-gyp ERR! install request to https://github.com/kelektiv/node ... -x64-unknown.tar.gz failed, reason: read ECONNRESET
    node-pre-gyp WARN Pre-built binaries not installable for bcrypt@5.0.1 and node@12.14.0 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
    node-pre-gyp WARN Hit error request to https://github.com/kelektiv/node ... -x64-unknown.tar.gz failed, reason: read ECONNRESET
    gyp ERR! find Python
    gyp ERR! find Python Python is not set from command line or npm configuration
    gyp ERR! find Python Python is not set from environment variable PYTHON
    gyp ERR! find Python checking if "python" can be used
    gyp ERR! find Python - "python" is not in PATH or produced an error
    gyp ERR! find Python checking if "python2" can be used
    gyp ERR! find Python - "python2" is not in PATH or produced an error
    gyp ERR! find Python checking if "python3" can be used
    gyp ERR! find Python - "python3" is not in PATH or produced an error
    gyp ERR! find Python checking if the py launcher can be used to find Python 2
    gyp ERR! find Python - "py.exe" is not in PATH or produced an error
    gyp ERR! find Python checking if Python is C:\Python27\python.exe
    gyp ERR! find Python - "C:\Python27\python.exe" could not be run
    gyp ERR! find Python checking if Python is C:\Python37\python.exe
    gyp ERR! find Python - "C:\Python37\python.exe" could not be run
    gyp ERR! find Python
    gyp ERR! find Python **********************************************************
    gyp ERR! find Python You need to install the latest version of Python.
    gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
    gyp ERR! find Python you can try one of the following options:
    gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
    gyp ERR! find Python   (accepted by both node-gyp and npm)
    gyp ERR! find Python - Set the environment variable PYTHON
    gyp ERR! find Python - Set the npm configuration variable python:
    gyp ERR! find Python   npm config set python "C:\Path\To\python.exe"
    gyp ERR! find Python For more information consult the documentation at:
    gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
    gyp ERR! find Python **********************************************************
    gyp ERR! find Python
    gyp ERR! configure error
    gyp ERR! stack Error: Could not find any Python installation to use
    gyp ERR! stack     at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47)
    gyp ERR! stack     at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21)
    gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16)
    gyp ERR! stack     at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16)
    gyp ERR! stack     at exithandler (child_process.js:302:5)
    gyp ERR! stack     at ChildProcess.errorhandler (child_process.js:314:5)
    gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
    gyp ERR! stack     at onErrorNT (internal/child_process.js:456:16)
    gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:80:21)
    gyp ERR! System Windows_NT 10.0.18363
    gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Program Files\\nodejs\\node_global\\node_modules\\node-red\\node_modules\\bcrypt\\lib\\binding\\napi-v3\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\Program Files\\nodejs\\node_global\\node_modules\\node-red\\node_modules\\bcrypt\\lib\\binding\\napi-v3" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
    gyp ERR! cwd C:\Program Files\nodejs\node_global\node_modules\node-red\node_modules\bcrypt
    gyp ERR! node -v v12.14.0
    gyp ERR! node-gyp -v v5.0.5
    gyp ERR! not ok
    node-pre-gyp ERR! build error
    node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Program Files\nodejs\node_global\node_modules\node-red\node_modules\bcrypt\lib\binding\napi-v3\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Program Files\nodejs\node_global\node_modules\node-red\node_modules\bcrypt\lib\binding\napi-v3 --napi_version=5 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
    node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_global\node_modules\node-red\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:89:23)
    node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
    node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
    node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
    node-pre-gyp ERR! System Windows_NT 10.0.18363
    node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_global\\node_modules\\node-red\\node_modules\\@mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
    node-pre-gyp ERR! cwd C:\Program Files\nodejs\node_global\node_modules\node-red\node_modules\bcrypt
    node-pre-gyp ERR! node -v v12.14.0
    node-pre-gyp ERR! node-pre-gyp -v v1.0.5
    node-pre-gyp ERR! not ok
    Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Program Files\nodejs\node_global\node_modules\node-red\node_modules\bcrypt\lib\binding\napi-v3\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Program Files\nodejs\node_global\node_modules\node-red\node_modules\bcrypt\lib\binding\napi-v3 --napi_version=5 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bcrypt@5.0.1 (node_modules\node-red\node_modules\bcrypt):
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bcrypt@5.0.1 install: `node-pre-gyp install --fallback-to-build`
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

    + node-red@2.0.5
    added 265 packages from 268 contributors in 486.358s
    PS C:\WINDOWS\system32>

    相关图片:

    1.jpg
    2.jpg
    回复
  • TA的每日心情
    奋斗
    2021-7-31 14:48
  • 签到天数: 12 天

    连续签到: 1 天

    [LV.3]偶尔看看II

     楼主| 发表于 2021-8-1 14:29:55 | 显示全部楼层 来自 中国湖南
    已解决
    https://blog.csdn.net/yong15565566939/article/details/105033931
    按这篇文章的第4.3.3操作
    回复
    1框架
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    关闭

    站长推荐上一条 /2 下一条

    QQ|小黑屋|Archiver|China Intelligent Manufacturing Challenge |京公网安备11010502043466号

    GMT+8, 2024-11-23 22:39 , Processed in 1.187637 second(s), 27 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表