작성
·
1.5K
1
npm install @tensorflow/tfjs-node를 하면 자꾸 이런 오류가 발생합니다
node-pre-gyp install failed with error: Error: Command failed: node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v7/3.2.0/CPU-windows-3.2.0.zip
node-pre-gyp WARN Pre-built binaries not found for @tensorflow/tfjs-node@3.2.0 and node@14.15.4 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
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:315:5)
gyp ERR! stack at ChildProcess.errorhandler (child_process.js:327:5)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! stack at onErrorNT (internal/child_process.js:465:16)
gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:80:21)
gyp ERR! System Windows_NT 10.0.18362
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:\\Users\\ASROCK\\Documents\\inflearn-nodejs\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v7\\tfjs_binding.node" "--module_name=tfjs_binding" "--module_path=C:\\Users\\ASROCK\\Documents\\inflearn-nodejs\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v7" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=7" "--node_napi_label=napi-v7"
gyp ERR! cwd C:\Users\ASROCK\Documents\inflearn-nodejs\node_modules\@tensorflow\tfjs-node
gyp ERR! node -v v14.15.4
gyp ERR! node-gyp -v v5.1.0
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:\Users\ASROCK\Documents\inflearn-nodejs\node_modules\@tensorflow\tfjs-node\lib\napi-v7\tfjs_binding.node --module_name=tfjs_binding --module_path=C:\Users\ASROCK\Documents\inflearn-nodejs\node_modules\@tensorflow\tfjs-node\lib\napi-v7 --napi_version=7 --node_abi_napi=napi --napi_build_version=7 --node_napi_label=napi-v7' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\ASROCK\Documents\inflearn-nodejs\node_modules\@tensorflow\tfjs-node\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Windows_NT 10.0.18362
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ASROCK\\Documents\\inflearn-nodejs\\node_modules\\@tensorflow\\tfjs-node\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\ASROCK\Documents\inflearn-nodejs\node_modules\@tensorflow\tfjs-node
node-pre-gyp ERR! node -v v14.15.4
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok
npm WARN inflearn-nodejs@1.0.0 No description
npm WARN inflearn-nodejs@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @tensorflow/tfjs-node@3.2.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @tensorflow/tfjs-node@3.2.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ASROCK\AppData\Roaming\npm-cache\_logs\2021-02-27T15_48_01_114Z-debug.log
구글링 결과 npm install을 하면 나머지 것들이 설치된다고 해서 해보고
코드를 돌려본 결과
internal/modules/cjs/loader.js:883
throw err;
^
Error: Cannot find module '@tensorflow/tfjs-node'
Require stack:
- C:\Users\ASROCK\Documents\inflearn-nodejs\helpers\detectProduct.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (C:\Users\ASROCK\Documents\inflearn-nodejs\helpers\detectProduct.js:1:12)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
{
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\ASROCK\\Documents\\inflearn-nodejs\\helpers\\detectProduct.js'
]
}
이런 에러가 추가적으로 발생합니다
뭐가 원인일까요?
답변 13
1
1
0
강의를 듣는 중 위와 같은 동일한 문제에 걸렸습니다.
@tensorflow/tfjs-node가 설치가 되질 않습니다.
@tensorflow/tfjs는 설치가 잘되던데, 혹시 다른건가요?
내부적으로 동작하는 방식이 다른 것으로 알고있습니다만 동일한 기능으로 알고있어요.
tfjs로 실습이 가능하면 그대로 따라가셔도 좋을 것 같습니다!
그리고 혹시 윈도우 환경과 tfjs-node 설치시 에러 내용을 공유해주실 수 있을까요?
@tensorflow/tfjs로 사용하면 오류가 발생하는 것으로 표시됩니다.
오류사항은 이전에 나온 사용자와 동일합니다. 현재는 정상적으로 설치가
되어 교육진행은 완료하였습니다.
해결책은 C:\에 파이썬을 설치하고 소스는 D:\에 두면서 참조가 안되는
현상으로 보입니다.(Path상의 문제) C:\로 소스를 이전하고 설치 진행하여 정상 설치가
되었습니다.
0
저도 같은 이유로 @tensonflow/tfjs-node가 설치가 되지않습니다. 보통 build tool로 해결되었다길래 같은 방법을 실행중이나 해결이 안될듯 싶습니다..어떻게 해결하면 좋을까요
거의 비슷한 내용의 문제였습니다 파이선을 찾지 못하는 경우거나 noide gyp에 문제가 있는것 같습니다
node-pre-gyp install failed with error: Error: Command failed: node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v7/3.6.1/CPU-windows-3.6.1.zip
node-pre-gyp WARN Pre-built binaries not found for @tensorflow/tfjs-node@3.6.1 and node@14.16.1 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
Traceback (most recent call last):
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 50, in <module>
sys.exit(gyp.script_main())
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 554, in script_main
return main(sys.argv[1:])
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 547, in main
return gyp_main(args)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 532, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 2008, in GenerateOutput
msvs_version)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1843, in _CreateProjectObjects
guid = _GetGuidOfProject(proj_path, spec)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 910, in _GetGuidOfProject
guid = guid or MSVSNew.MakeGuid(proj_path)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSNew.py", line 48, in MakeGuid
d = hashlib.md5((str(seed) + str(name)).encode('utf-8')).hexdigest().upper()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb9 in position 31: ordinal not in range(128)
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Windows_NT 10.0.19041
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:\\Users\\user\\OneDrive\\바탕 화면\\Node-folder\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v7\\tfjs_binding.node" "--module_name=tfjs_binding" "--module_path=C:\\Users\\user\\OneDrive\\바탕 화면\\Node-folder\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v7" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=7" "--node_napi_label=napi-v7"
gyp ERR! cwd C:\Users\user\OneDrive\바탕 화면\Node-folder\node_modules\@tensorflow\tfjs-node
gyp ERR! node -v v14.16.1
gyp ERR! node-gyp -v v5.1.0
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:\Users\user\OneDrive\바탕 화면\Node-folder\node_modules\@tensorflow\tfjs-node\lib\napi-v7\tfjs_binding.node --module_name=tfjs_binding --module_path=C:\Users\user\OneDrive\바탕 화면\Node-folder\node_modules\@tensorflow\tfjs-node\lib\napi-v7 --napi_version=7 --node_abi_napi=napi --napi_build_version=7 --node_napi_label=napi-v7' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\user\OneDrive\바탕 화면\Node-folder\node_modules\@tensorflow\tfjs-node\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Windows_NT 10.0.19041
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\user\\OneDrive\\바탕 화면\\Node-folder\\node_modules\\@tensorflow\\tfjs-node\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\user\OneDrive\바탕 화면\Node-folder\node_modules\@tensorflow\tfjs-node
node-pre-gyp ERR! node -v v14.16.1
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok
npm WARN node-folder@1.0.0 No description
npm WARN node-folder@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @tensorflow/tfjs-node@3.6.1 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @tensorflow/tfjs-node@3.6.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Roaming\npm-cache\_logs\2021-05-18T04_32_59_958Z-debug.log
아래와 같이 실행해보시고 다시 확인해보시겠어요~?
1. 명령프롬프트, powershell 관리자 권한으로 실행
2. npm install --global windows-build-tools
3. npm install --global node-gyp
windows build는 계속 이상태를 유지합니다
에러는 다음과 같이 발생합니다
node-pre-gyp install failed with error: Error: Command failed: node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v7/3.6.1/CPU-windows-3.6.1.zip
node-pre-gyp WARN Pre-built binaries not found for @tensorflow/tfjs-node@3.6.1 and node@14.16.1 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
Traceback (most recent call last):
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 50, in <module>
sys.exit(gyp.script_main())
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 554, in script_main
return main(sys.argv[1:])
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 547, in main
return gyp_main(args)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 532, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 2008, in GenerateOutput
msvs_version)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1843, in _CreateProjectObjects
guid = _GetGuidOfProject(proj_path, spec)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 910, in _GetGuidOfProject
guid = guid or MSVSNew.MakeGuid(proj_path)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSNew.py", line 48, in MakeGuid
d = hashlib.md5((str(seed) + str(name)).encode('utf-8')).hexdigest().upper()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb9 in position 31: ordinal not in range(128)
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Windows_NT 10.0.19041
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:\\Users\\user\\OneDrive\\바탕 화면\\Node-folder\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v7\\tfjs_binding.node" "--module_name=tfjs_binding" "--module_path=C:\\Users\\user\\OneDrive\\바탕 화면\\Node-folder\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v7" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=7" "--node_napi_label=napi-v7"
gyp ERR! cwd C:\Users\user\OneDrive\바탕 화면\Node-folder\node_modules\@tensorflow\tfjs-node
gyp ERR! node -v v14.16.1
gyp ERR! node-gyp -v v5.1.0
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:\Users\user\OneDrive\바탕 화면\Node-folder\node_modules\@tensorflow\tfjs-node\lib\napi-v7\tfjs_binding.node --module_name=tfjs_binding --module_path=C:\Users\user\OneDrive\바탕 화면\Node-folder\node_modules\@tensorflow\tfjs-node\lib\napi-v7 --napi_version=7 --node_abi_napi=napi --napi_build_version=7 --node_napi_label=napi-v7' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\user\OneDrive\바탕 화면\Node-folder\node_modules\@tensorflow\tfjs-node\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Windows_NT 10.0.19041
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\user\\OneDrive\\바탕 화면\\Node-folder\\node_modules\\@tensorflow\\tfjs-node\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\user\OneDrive\바탕 화면\Node-folder\node_modules\@tensorflow\tfjs-node
node-pre-gyp ERR! node -v v14.16.1
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok
npm WARN node-folder@1.0.0 No description
npm WARN node-folder@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @tensorflow/tfjs-node@3.6.1 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @tensorflow/tfjs-node@3.6.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Roaming\npm-cache\_logs\2021-05-21T04_55_32_269Z-debug.log
0
저희가 화상으로 문제 해결한 이후
다음날 에러가 수정되어 배포됐네요! ㅋㅋ 다시 최신 버전으로 업데이트 해서 테스트해보셔도 좋을 것 같아요 😁
https://github.com/tensorflow/tfjs/pull/4754
0
현재 npm install --global windows-build-tools은 관리자 권한으로 success 창까지 나온 걸 확인하고 다시 VS로 들어와서 npm install @tensorflow/tfjs-node을 실행한 결과
npm ERR! @tensorflow/tfjs-node@3.2.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @tensorflow/tfjs-node@3.2.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ASROCK\AppData\Roaming\npm-cache\_logs\2021-03-05T04_15_20_158Z-debug.log
오류가 발생하였고 파이썬은 지금 2.7버전 하나만 깔린 상태입니다.....
0
0
PS C:\Users\ASROCK\Documents\inflearn-nodejs> npm install --global windows-build-tools
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
> windows-build-tools@5.2.2 postinstall C:\Users\ASROCK\AppData\Roaming\npm\node_modules\windows-build-tools
> node ./dist/index.js
... and 1 more
Downloaded python-2.7.15.amd64.msi. Saved to C:\Users\ASROCK\.windows-build-tools\python-2.7.15.amd64.msi.
... and 1 more
Downloaded vs_BuildTools.exe. Saved to C:\Users\ASROCK\.windows-build-tools\vs_BuildTools.exe.
Starting installation...
Please restart this script from an administrative PowerShell!
The build tools cannot be installed without administrative rights.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! windows-build-tools@5.2.2 postinstall: `node ./dist/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the windows-build-tools@5.2.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ASROCK\AppData\Roaming\npm-cache\_logs\2021-03-01T10_42_02_967Z-debug.log
PS C:\Users\ASROCK\Documents\inflearn-nodejs> npm i -g node-pre-gyp
npm WARN deprecated node-pre-gyp@0.17.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
C:\Users\ASROCK\AppData\Roaming\npm\node-pre-gyp -> C:\Users\ASROCK\AppData\Roaming\npm\node_modules\node-pre-gyp\bin\node-pre-gyp
+ node-pre-gyp@0.17.0
added 66 packages from 25 contributors in 7.18s
이 역시 안됩니다ㅠ
0
우선 아래 명령어로 windows-build-tools를 설치해주세요!
npm install --global windows-build-tools
만일 이도 안된다면 아래와 같은 명령어로 node-pre-gyp을 설치해주세요!
npm i -g node-gyp
0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @tensorflow/tfjs-node@3.2.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @tensorflow/tfjs-node@3.2.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ASROCK\AppData\Roaming\npm-cache\_logs\2021-02-28T17_25_46_366Z-debug.log
또 에러가 발생합니다 ㅠㅠ
0
0
여전히 에러가 발생합니다.
node-pre-gyp install failed with error: Error: Command failed: node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v7/3.2.0/CPU-windows-3.2.0.zip
node-pre-gyp WARN Pre-built binaries not found for @tensorflow/tfjs-node@3.2.0 and node@14.15.4 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
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:315:5)
gyp ERR! stack at ChildProcess.errorhandler (child_process.js:327:5)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! stack at onErrorNT (internal/child_process.js:465:16)
gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:80:21)
gyp ERR! System Windows_NT 10.0.18362
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:\\Users\\ASROCK\\Documents\\inflearn-nodejs\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v7\\tfjs_binding.node" "--module_name=tfjs_binding" "--module_path=C:\\Users\\ASROCK\\Documents\\inflearn-nodejs\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v7" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=7" "--node_napi_label=napi-v7"
gyp ERR! cwd C:\Users\ASROCK\Documents\inflearn-nodejs\node_modules\@tensorflow\tfjs-node
gyp ERR! node -v v14.15.4
gyp ERR! node-gyp -v v5.1.0
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:\Users\ASROCK\Documents\inflearn-nodejs\node_modules\@tensorflow\tfjs-node\lib\napi-v7\tfjs_binding.node --module_name=tfjs_binding --module_path=C:\Users\ASROCK\Documents\inflearn-nodejs\node_modules\@tensorflow\tfjs-node\lib\napi-v7 --napi_version=7 --node_abi_napi=napi --napi_build_version=7 --node_napi_label=napi-v7' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\ASROCK\Documents\inflearn-nodejs\node_modules\@tensorflow\tfjs-node\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Windows_NT 10.0.18362
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ASROCK\\Documents\\inflearn-nodejs\\node_modules\\@tensorflow\\tfjs-node\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\ASROCK\Documents\inflearn-nodejs\node_modules\@tensorflow\tfjs-node
node-pre-gyp ERR! node -v v14.15.4
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok
npm WARN inflearn-nodejs@1.0.0 No description
npm WARN inflearn-nodejs@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @tensorflow/tfjs-node@3.2.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @tensorflow/tfjs-node@3.2.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ASROCK\AppData\Roaming\npm-cache\_logs\2021-02-28T11_11_06_347Z-debug.log
0
안녕하세요!
현재 Python이 설치되지 않아서 tensorflow-node가 제대로 설치되지 않은 것 같아요.
아래 링크 보시면서 Python3 설치해보시고 다시 시도해주시겠어요?
https://www.codingfactory.net/10023
Python2 버전이 제대로 설치되지 않았을 때 요 문제가 생기는 것 같아요
관리자 권한으로도 안된다면 Python2, 3를 삭제하고 다시 2만 설치해보세요!
네! 우선 여기 참고 링크도 드릴게요!
https://github.com/tensorflow/tfjs-node/blob/master/tfjs-node/WINDOWS_TROUBLESHOOTING.md