인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

인프런 커뮤니티 질문&답변

qkqh0790님의 프로필 이미지
qkqh0790

작성한 질문수

비전공자를 위한 진짜 입문 올인원 개발 부트캠프

Tensorflow install

작성

·

258

1

혹시 tensorflow install 부터 막히는데 파이썬 3버전을 지우고 2버전을 설치한 상태입니다.

그 전 같은 질문이 있지만 화상으로 해결하신 것 같아 질문 남십니다.

답변 2

0

qkqh0790님의 프로필 이미지
qkqh0790
질문자

npm WARN deprecated node-pre-gyp@0.14.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

> @tensorflow/tfjs-node@3.6.1 install C:\Users\s\Desktop\10주차 캡스톤\web\node_modules\@tensorflow\tfjs-node

> node scripts/install.js

CPU-windows-3.6.1.zip

* Downloading libtensorflow

[==============================] 8462222/bps 100% 0.0s

* Building TensorFlow Node.js bindings

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 "D:\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 50, in <module>

    sys.exit(gyp.script_main())

  File "D:\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 554, in script_main

    return main(sys.argv[1:])

  File "D:\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 547, in main

    return gyp_main(args)

  File "D:\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 "D:\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 2008, in GenerateOutput

    msvs_version)

  File "D:\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1843, in _CreateProjectObjects

    guid = _GetGuidOfProject(proj_path, spec)

  File "D:\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 "D:\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 0xc1 in position 29: 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 (D:\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 "D:\\node.exe" "D:\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\s\\Desktop\\10주차 캡스톤\\web\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v7\\tfjs_binding.node" "--module_name=tfjs_binding" "--module_path=C:\\Users\\s\\Desktop\\10주차 캡스톤\\web\\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\s\Desktop\10주차 캡스톤\web\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 'D:\node.exe D:\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\s\Desktop\10주차 캡스톤\web\node_modules\@tensorflow\tfjs-node\lib\napi-v7\tfjs_binding.node --module_name=tfjs_binding --module_path=C:\Users\s\Desktop\10주차 캡스톤\web\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\s\Desktop\10주차 캡스톤\web\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 "D:\\node.exe" "C:\\Users\\s\\Desktop\\10주차 캡스톤\\web\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"

node-pre-gyp ERR! cwd C:\Users\s\Desktop\10주차 캡스톤\web\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 @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.13.12 requires a peer of @babel/core@^7.13.0 but none is installed. You must install peer dependencies yourself.

npm WARN tsutils@3.21.0 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\webpack-dev-server\node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\watchpack-chokidar2\node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

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\s\AppData\Roaming\npm-cache\_logs\2021-05-19T04_05_01_287Z-debug.log

이렇게 나옵니다

그랩님의 프로필 이미지
그랩
지식공유자

npm install @tensorflow/tfjs-node-gpu

위 명령어로 설치해보시겠어요? python --version 명령어를 통해 python 버전이 2 버전대인지도 확인해주세요.

만약 되신다면 회신 부탁드립니다~

qkqh0790님의 프로필 이미지
qkqh0790
질문자

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/GPU-windows-3.6.1.zip

node-pre-gyp WARN Pre-built binaries not found for @tensorflow/tfjs-node-gpu@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 "D:\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 50, in <module>

    sys.exit(gyp.script_main())

  File "D:\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 554, in script_main

    return main(sys.argv[1:])

  File "D:\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 547, in main

    return gyp_main(args)

  File "D:\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 "D:\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 2008, in GenerateOutput

    msvs_version)

  File "D:\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 1843, in _CreateProjectObjects

    guid = _GetGuidOfProject(proj_path, spec)

  File "D:\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 "D:\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 0xc1 in position 29: 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 (D:\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 "D:\\node.exe" "D:\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\s\\Desktop\\10주차 캡스톤\\web\\node_modules\\@tensorflow\\tfjs-node-gpu\\lib\\napi-v7\\tfjs_binding.node" "--module_name=tfjs_binding" "--module_path=C:\\Users\\s\\Desktop\\10주차 캡스톤\\web\\node_modules\\@tensorflow\\tfjs-node-gpu\\lib\\napi-v7" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=7" "--node_napi_label=napi-v7"

gyp ERR! cwd C:\Users\s\Desktop\10주차 캡스톤\web\node_modules\@tensorflow\tfjs-node-gpu

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 'D:\node.exe D:\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\s\Desktop\10주차 캡스톤\web\node_modules\@tensorflow\tfjs-node-gpu\lib\napi-v7\tfjs_binding.node --module_name=tfjs_binding --module_path=C:\Users\s\Desktop\10주차 캡스톤\web\node_modules\@tensorflow\tfjs-node-gpu\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\s\Desktop\10주차 캡스톤\web\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 "D:\\node.exe" "C:\\Users\\s\\Desktop\\10주차 캡스톤\\web\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"

node-pre-gyp ERR! cwd C:\Users\s\Desktop\10주차 캡스톤\web\node_modules\@tensorflow\tfjs-node-gpu

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 @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.13.12 requires a peer of @babel/core@^7.13.0 but none is installed. You must install peer dependencies yourself.

npm WARN tsutils@3.21.0 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\webpack-dev-server\node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\watchpack-chokidar2\node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! @tensorflow/tfjs-node-gpu@3.6.1 install: `node scripts/install.js gpu download`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the @tensorflow/tfjs-node-gpu@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\s\AppData\Roaming\npm-cache\_logs\2021-05-24T06_24_16_484Z-debug.log

오류는 이렇게 납니다.

python --version

Python 2.7.18

파이썬은 2버전으로 설치되어 되어 있음을 확인했습니다.

그랩님의 프로필 이미지
그랩
지식공유자

우선 아래쪽을 참고해보시면 좋을 것 같아요.
https://github.com/tensorflow/tfjs/blob/master/tfjs-node/WINDOWS_TROUBLESHOOTING.md

프롬프트를 관리자 권한으로 돌아가서 아래 명령어를 입력해보세요~!

npm install -g --production windows-build-tools

0

그랩님의 프로필 이미지
그랩
지식공유자

안녕하세요. 혹시 에러 내용을 보여주실 수 있으신가요~?

qkqh0790님의 프로필 이미지
qkqh0790

작성한 질문수

질문하기