기타

[node-red] find python 에러

Beginner:) 2021. 5. 10.
320x100

 

windows에서 파이썬 2.7 또는 gyp 의존성 등 설치가 되어 있지 않으면 종종 뜨는 오류

 

관리자 권한으로 명령프롬프트창을 실행한 뒤

npm install --global windows-build-tools

위 명령어를 실행

이런식의 창이 뜨면 에러가 난 부분을 다시 실행

 

 

-----------------------------------------------------에러코드------------------------------------------------------------

npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-node-arduino@0.3.1

[out] > @serialport/bindings@8.0.8 install C:\Users\user\.node-red\node_modules\@serialport\bindings

[out] > prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild

[err] prebuild-install

[err] WARN install No prebuilt binaries found (target=14.16.0 runtime=node arch=x64 libc= platform=win32)

[out] C:\Users\user\.node-red\node_modules\@serialport\bindings>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )

[err] ERR! find Python

[err] find Python Python is not set from command line or npm configuration

[err] gyp ERR!

[err] find Python Python is not set from environment variable PYTHON

[err] gyp ERR!

[err] find Python checking if "python" can be used

[err] gyp ERR! find Python

[err] - "python" is not in PATH or produced an error

[err] gyp ERR! find Python checking if "python2" can be used

[err] gyp ERR! find Python - "python2" is not in PATH or produced an error

[err] ERR! find Python checking if "python3" can be used

[err] find Python - "python3" is not in PATH or produced an error

[err] gyp ERR! find Python

[err] checking if the py launcher can be used to find Python 2

[err] gyp ERR! find Python - "py.exe" is not in PATH or produced an error

[err] gyp

[err] ERR! find Python checking if Python is C:\Python27\python.exe

[err] gyp ERR! find Python

[err] - "C:\Python27\python.exe" could not be run

[err] gyp ERR! find Python checking if Python is C:\Python37\python.exe

[err] gyp

[err] ERR! find Python - "C:\Python37\python.exe" could not be run

[err] find Python

[err] gyp ERR! find Python **********************************************************

[err] gyp ERR! find Python You need to install the latest version of Python.

[err] gyp ERR!

[err] find Python Node-gyp should be able to find and use Python. If not,

[err] gyp ERR! find Python you can try one of the following options:

[err] gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"

[err] gyp ERR!

[err] find Python (accepted by both node-gyp and npm)

[err] gyp ERR! find Python - Set the environment variable PYTHON

[err] gyp ERR! find Python - Set the npm configuration variable python:

[err] gyp ERR!

[err] find Python npm config set python "C:\Path\To\python.exe"

[err] gyp ERR! find Python

[err] For more information consult the documentation at:

[err] gyp ERR! find Python https://github.com/nodejs/node-gyp#installation

[err] ERR! find Python **********************************************************

[err] gyp ERR! find Python

[err] ERR! configure error

[err] gyp ERR!

[err] stack Error: Could not find any Python installation to use

[err] gyp ERR! stack at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47)

[err] gyp ERR!

[err] stack at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21)

[err] gyp ERR! stack at PythonFinder. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16)

[err] gyp ERR!

[err] stack at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16)

[err] gyp ERR! stack at exithandler (child_process.js:315:5)

[err] gyp ERR!

[err] stack at ChildProcess.errorhandler (child_process.js:327:5)

[err] gyp ERR! stack

[err] at ChildProcess.emit (events.js:315:20)

[err] gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)

[err] gyp ERR!

[err] stack at onErrorNT (internal/child_process.js:465:16)

[err] gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:80:21)

[err] gyp ERR!

[err] System Windows_NT 10.0.19042

[err] gyp ERR!

[err] command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"

[err] gyp ERR! cwd

[err] C:\Users\user\.node-red\node_modules\@serialport\bindings

[err] gyp ERR! node -v v14.16.0

[err] gyp ERR! node-gyp -v v5.1.0

[err] gyp

[err] ERR! not ok

[err] npm ERR! code ELIFECYCLE

[err] npm ERR! errno 1

[err] npm ERR! @serialport/bindings@8.0.8 install: `prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild`

[err] npm

[err] ERR! Exit status 1

[err] npm ERR!

[err] npm ERR! Failed at the @serialport/bindings@8.0.8 install script.

[err] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

[err] npm ERR! A complete log of this run can be found in:

[err] npm ERR! C:\Users\user\AppData\Roaming\npm-cache\_logs\2021-05-10T05_25_20_569Z-debug.log

rc=1

반응형

'기타' 카테고리의 다른 글

부팅시 인터넷 자동실행  (0) 2022.01.19
임베디드 개발자 필수 기술  (0) 2021.12.21
Oracle VM(Virtual Box) 파일복사  (0) 2021.05.07
구글 크롬 PDF 번역하기  (0) 2021.03.31
수학기호 특수문자 (Math special character)  (0) 2021.02.11

댓글