gyp ERR! stack Error: Could not find any Python installation to use
需要python
·
头部错误提示
gyp info it worked if it ends with ok
gyp info using node-gyp@9.0.0
gyp info using node@16.15.1 | win32 | x64
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 **********************************************************
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 (D:\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:330:47)
gyp ERR! stack at PythonFinder.runChecks (D:\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:159:21)
gyp ERR! stack at PythonFinder.<anonymous> (D:\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:248:16)
gyp ERR! stack at PythonFinder.execFileCallback (D:\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:294:16)
gyp ERR! stack at exithandler (node:child_process:406:5)
gyp ERR! stack at ChildProcess.errorhandler (node:child_process:418:5)
gyp ERR! stack at ChildProcess.emit (node:events:527:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
gyp ERR! stack at onErrorNT (node:internal/child_process:478:16)
gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:83:21)
gyp ERR! System Windows_NT 10.0.22000
gyp ERR! command "D:\\nodejs\\node.exe" "D:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd G:\aidex系列\前端\aidex-ui\node_modules\deasync
gyp ERR! node -v v16.15.1
gyp ERR! node-gyp -v v9.0.0
gyp ERR! not ok
解决办法
npm 安装
npm i -g node-gyp
yarn 安装
yarn global add node-gyp
更多推荐
已为社区贡献6条内容
所有评论(0)