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

kmh님의 프로필 이미지
kmh

작성한 질문수

트렐로 개발로 배우는 Vuejs, Vuex, Vue-Router 프론트엔드 실전 기술

백엔드 API 살펴보기

노드 api 서버 npm install 시 발생하는 에러

작성

·

21K

0

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

gypgyp ERR!  find PythonERR! checking if the py launcher can be used to find Python 2

 gypfind Python ERR!

 gypfind Python  - "py.exe" is not in PATH or produced an error

ERR!gyp  find PythonERR!  Python is not set from command line or npm configuration

find Pythongyp checking if Python is C:\Python27\python.exe

 ERR!gyp find Python  Python is not set from environment variable PYTHON

ERR!gyp  find Python - "C:\Python27\python.exe" could not be run

ERR!gyp find Python  checking if "python" can be used

ERR! gypfind Python checking if Python is C:\Python37\python.exe

 gypERR!  ERR! find Pythonfind Python - "C:\Python37\python.exe" could not be run

 - "python" is not in PATH or produced an error

gypgyp  ERR!ERR!  find Pythonfind Python

 checking if "python2" can be used

gyp gypERR!  ERR!find Python  **********************************************************

find Pythongyp - "python2" is not in PATH or produced an error

 gypERR!  ERR!find Python You need to install the latest version of Python.

 gypfind Python  checking if "python3" can be used

ERR!gyp  find PythonERR! Node-gyp should be able to find and use Python. If not,

 gyp find PythonERR! - "python3" is not in PATH or produced an error

 gypfind Python  you can try one of the following options:

gypERR!  ERR!find Python  checking if the py launcher can be used to find Python 2

find Pythongyp - Use the switch --python="C:\Path\To\python.exe"

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

ERR!gyp  ERR!find Python    (accepted by both node-gyp and npm)

find Python checking if Python is C:\Python27\python.exe

gyp gypERR!  ERR! find Pythonfind Python - Set the environment variable PYTHON

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

gypgyp  ERR!ERR!  find Pythonfind Python - Set the npm configuration variable python:

 checking if Python is C:\Python37\python.exe

gyp gypERR!  find PythonERR!   npm config set python "C:\Path\To\python.exe"

 gypfind Python - "C:\Python37\python.exe" could not be run

 gypERR!  find PythonERR! For more information consult the documentation at:

 find Pythongyp

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

find Pythongyp **********************************************************

 gypERR!  ERR!find Python find Python **********************************************************

 You need to install the latest version of Python.

gypgyp ERR!  find PythonERR! Node-gyp should be able to find and use Python. If not,

 gypfind Python

ERR! find Python you can try one of the following options:

gypgyp  ERR!ERR!  find Pythonconfigure error

 - Use the switch --python="C:\Path\To\python.exe"

gypgyp  ERR!ERR!  stackfind Python Error: Could not find any Python installation to use

   (accepted by both node-gyp and npm)

gypgyp  ERR!ERR!  find Pythonstack - Set the environment variable PYTHON

     at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47)

gypgyp ERR!  ERR!find Python - Set the npm configuration variable python:

 gypstack ERR!     at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21)

gyp find Python    npm config set python "C:\Path\To\python.exe"

ERR! gypstack      at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16)

ERR!gyp  find Python For more information consult the documentation at:

ERR!gyp  stackERR!     at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16)

 gypfind Python  https://github.com/nodejs/node-gyp#installation

ERR!gyp  ERR!stack find Python     at exithandler (child_process.js:310:5)

 **********************************************************

gypgyp  ERR!ERR!  stackfind Python     at ChildProcess.errorhandler (child_process.js:322:5)

gyp ERR!gyp  stackERR!     at ChildProcess.emit (events.js:311:20)

 gypconfigure error

 ERR! gypstack      at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)

ERR!gyp  stackERR! Error: Could not find any Python installation to use

 gypstack      at onErrorNT (internal/child_process.js:469:16)

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

 gypstack     at processTicksAndRejections (internal/process/task_queues.js:84:21)

 ERR! stackgyp     at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21)

 gypERR!  ERR!System  Windows_NT 10.0.17763

stackgyp     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16)

 gypERR!  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\\LG\\WebstormProjects\\lecture-vue-trello-server\\node_module

s\\sqlite3\\lib\\binding\\node-v72-win32-x64\\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\\Users\\LG\\WebstormProjects\\lecture-vue-trello-server\\node_modules\\sqlite3\\lib\\binding\\node-v72-win32-x64" "--napi_version=5" "--node_abi_napi=nap

i"

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

gyp gypERR!  ERR! cwdstack C:\Users\LG\WebstormProjects\lecture-vue-trello-server\node_modules\sqlite3

     at exithandler (child_process.js:310:5)

gypgyp  ERR!ERR!  stack     at ChildProcess.errorhandler (child_process.js:322:5)

node -vgyp v12.16.1

 ERR!gyp  ERR!stack      at ChildProcess.emit (events.js:311:20)

node-gyp -vgyp  v5.0.5

ERR!gyp  stackERR!     at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)

gyp  not okERR!

 stack     at onErrorNT (internal/child_process.js:469:16)

gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:84:21)

gyp ERR! System Windows_NT 10.0.17763

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\\LG\\WebstormProjects\\lecture-vue-trello-server\\node_modules\\sql

ite3\\lib\\binding\\node-v72-win32-x64\\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\\Users\\LG\\WebstormProjects\\lecture-vue-trello-server\\node_modules\\sqlite3\\lib\\binding\\node-v72-win32-x64" "--napi_version=5" "--node_abi_napi=napi"

gyp ERR! cwd C:\Users\LG\WebstormProjects\lecture-vue-trello-server\node_modules\sqlite3

gyp ERR! node -v v12.16.1

gyp ERR! node-gyp -v v5.0.5

gypnode-pre-gyp  ERR!ERR!  build errornot ok

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\LG\WebstormProjects\lecture-vue-trello-server\node_modu

les\sqlite3\lib\binding\node-v72-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\LG\WebstormProjects\lecture-vue-trello-server\node_modules\sqlite3\lib\binding\node-v72-win32-x64 --napi_version=5 --node_abi_napi=napi' (1)

node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\LG\WebstormProjects\lecture-vue-trello-server\node_modules\node-pre-gyp\lib\util\compile.js:83:29)

node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:311:20)

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:286:5)

node-pre-gyp ERR! System Windows_NT 10.0.17763

node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\LG\\WebstormProjects\\lecture-vue-trello-server\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"

node-pre-gyp ERR! cwd C:\Users\LG\WebstormProjects\lecture-vue-trello-server\node_modules\sqlite3

node-pre-gyp ERR! node -v v12.16.1

node-pre-gyp ERR! node-pre-gyp -v v0.10.3

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:\Users\LG\WebstormProjects\lecture-vue-trello-server\node_modules\sqlite3\lib\binding\node-v7

2-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\Users\LG\WebstormProjects\lecture-vue-trello-server\node_modules\sqlite3\lib\binding\node-v72-win32-x64 --napi_version=5 --node_abi_napi=napi' (1)

npm WARN rollback Rolling back safe-buffer@5.1.2 failed (this is probably harmless): EPERM: operation not permitted, rmdir 'C:\Users\LG\WebstormProjects\lecture-vue-trello-server\node_modules\minipass\node_modules'

npm WARN lecture-vue-trello-server@1.0.0 No description

npm WARN lecture-vue-trello-server@1.0.0 No repository field.

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

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

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! sqlite3@4.0.2 install: `node-pre-gyp install --fallback-to-build`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the sqlite3@4.0.2 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\LG\AppData\Roaming\npm-cache\_logs\2020-04-11T16_23_05_051Z-debug.log

무슨오류인가요..?

sqlite3, python 둘다 설치했는데도 에러가 납니다 ㅠㅠ

강의에는 아무 설명도 없고 답답해서 질문올려요

답변 5

4

감사합니다!

제 win10환경에선 npm i sqlite3 입력해주니깐 실행되네요 ㅎㅎ

감사합니다! 덕분에 저도 에러 해결 됐습니다

4

저도 동일한 문제를 겪었는데, 맥에서 두 패키지를 추가하니 해결되었습니다.


npm i node-pre-gyp
npm i sqlite3 

3

김정환님 안녕하세요. 

@kmhs님과 같은 문제가 있어서 알려주신 방법(1, 2)을 해봤는데 해결이 안돼서 질문드립니다. 

방법이 없을까요? 참고로 Windows10 환경에서 실습하고 있습니다.

감사합니다.,

=> 해결 했습니다. Git bash는 실패 했는데, WSL Ubuntu 18.0 환경에는 문제 없네요. 

      맥PC는 괜찮은데 윈도우PC는 아마도 리눅스 환경에서 실행해야 하나봐요?. 

0

김정환님의 프로필 이미지
김정환
지식공유자

아 그렇군요. 운영체제 환경의 문제인가 보네요 

0

김정환님의 프로필 이미지
김정환
지식공유자

Python, sqlite3 같은 키워드를 보면 노드 버전이나 패키지 버전 이슈가 아닐까 싶습니다. 1) 노드 버전은 확인해 보시거나 2) node_modules 폴더를 삭제하고 다시 설치해보세요 

kmh님의 프로필 이미지
kmh

작성한 질문수

질문하기