Closed xeoshow closed 4 months ago
After changing the version of python from 2.7.18 to 3.12.2 on windows 10 64bit, still failed with below:
PS D:\gitrepository\yy-software\build> pnpm install gl --save
WARN 1 deprecated subdependencies found: @npmcli/move-file@2.0.1
Packages: +11
+++++++++++
Progress: resolved 383, reused 368, downloaded 0, added 0, done
node_modules/.pnpm/gl@6.0.2/node_modules/gl: Running install script, failed in 18.8s
.../.pnpm/gl@6.0.2/node_modules/gl install$ prebuild-install || node-gyp rebuild
│ prebuild-install warn install No prebuilt binaries found (target=20.11.1 runtime=node arch=x64 libc= platform=win32)
│ gyp info it worked if it ends with ok
│ gyp info using node-gyp@9.4.1
│ gyp info using node@20.11.1 | win32 | x64
│ gyp info find Python using Python version 3.12.2 found at "C:\Python312\python.exe"
│ gyp http GET https://nodejs.org/download/release/v20.11.1/node-v20.11.1-headers.tar.gz
│ gyp http 200 https://nodejs.org/download/release/v20.11.1/node-v20.11.1-headers.tar.gz
│ gyp http GET https://nodejs.org/download/release/v20.11.1/SHASUMS256.txt
│ gyp http GET https://nodejs.org/download/release/v20.11.1/win-x64/node.lib
│ gyp http 200 https://nodejs.org/download/release/v20.11.1/SHASUMS256.txt
│ gyp http 200 https://nodejs.org/download/release/v20.11.1/win-x64/node.lib
│ gyp info find VS using VS2019 (16.11.34601.136) found at:
│ gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
│ gyp info find VS run with --verbose for detailed information
│ gyp info spawn C:\Python312\python.exe
│ gyp info spawn args [
│ gyp info spawn args 'D:\\gitrepository\\yy-software\\build\\node_modules\\.pnpm\\node-gyp@9.4.1\\node_modul…
│ gyp info spawn args 'binding.gyp',
│ gyp info spawn args '-f',
│ gyp info spawn args 'msvs',
│ gyp info spawn args '-I',
│ gyp info spawn args 'D:\\gitrepository\\yy-software\\build\\node_modules\\.pnpm\\gl@6.0.2\\node_modules\\gl…
│ gyp info spawn args '-I',
│ gyp info spawn args 'D:\\gitrepository\\yy-software\\build\\node_modules\\.pnpm\\node-gyp@9.4.1\\node_modul…
│ gyp info spawn args '-I',
│ gyp info spawn args 'C:\\Users\\thinkpad\\AppData\\Local\\node-gyp\\Cache\\20.11.1\\include\\node\\common.gypi',
│ gyp info spawn args '-Dlibrary=shared_library',
│ gyp info spawn args '-Dvisibility=default',
│ gyp info spawn args '-Dnode_root_dir=C:\\Users\\thinkpad\\AppData\\Local\\node-gyp\\Cache\\20.11.1',
│ gyp info spawn args '-Dnode_gyp_dir=D:\\gitrepository\\yy-software\\build\\node_modules\\.pnpm\\node-gyp@9.…
│ gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\thinkpad\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\20.11.1\…
│ gyp info spawn args '-Dmodule_root_dir=D:\\gitrepository\\yy-software\\build\\node_modules\\.pnpm\\gl@6.0.2…
│ gyp info spawn args '-Dnode_engine=v8',
│ gyp info spawn args '--depth=.',
│ gyp info spawn args '--no-parallel',
│ gyp info spawn args '--generator-output',
│ gyp info spawn args 'D:\\gitrepository\\yy-software\\build\\node_modules\\.pnpm\\gl@6.0.2\\node_modules\\gl…
│ gyp info spawn args '-Goutput_dir=.'
│ gyp info spawn args ]
│ Traceback (most recent call last):
│ File "D:\gitrepository\yy-software\build\node_modules\.pnpm\node-gyp@9.4.1\node_modules\node-gyp\gyp\gyp_ma…
│ import gyp # noqa: E402
│ ^^^^^^^^^^
│ File "D:\gitrepository\yy-software\build\node_modules\.pnpm\node-gyp@9.4.1\node_modules\node-gyp\gyp\pylib\…
│ import gyp.input
│ File "D:\gitrepository\yy-software\build\node_modules\.pnpm\node-gyp@9.4.1\node_modules\node-gyp\gyp\pylib\…
│ from distutils.version import StrictVersion
│ ModuleNotFoundError: No module named 'distutils'
│ gyp ERR! configure error
│ gyp ERR! stack Error: `gyp` failed with exit code: 1
│ gyp ERR! stack at ChildProcess.onCpExit (D:\gitrepository\yy-software\build\node_modules\.pnpm\node-gyp@9…
│ gyp ERR! stack at ChildProcess.emit (node:events:518:28)
│ gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
│ gyp ERR! System Windows_NT 10.0.19045
│ gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\gitrepository\\yy-software\\build\\node_modules\\…
│ gyp ERR! cwd D:\gitrepository\yy-software\build\node_modules\.pnpm\gl@6.0.2\node_modules\gl
│ gyp ERR! node -v v20.11.1
│ gyp ERR! node-gyp -v v9.4.1
│ gyp ERR! not ok
└─ Failed in 18.8s at D:\gitrepository\yy-software\build\node_modules\.pnpm\gl@6.0.2\node_modules\gl
ELIFECYCLE Command failed with exit code 1.
PS D:\gitrepository\yy-software\build>
I got below error when using python-2.7.18.amd64.msi on windows, but it is said that node-gyp should be run with python 2.7.X ? Any help is highly appreciated!