curlconverter / curlconverter

Transpile curl commands into Python, JavaScript and 27 other languages
https://curlconverter.com
MIT License
7.17k stars 867 forks source link

Unable to install in the Python 3.12 #628

Open edisonyan opened 3 months ago

edisonyan commented 3 months ago

node_modules/.pnpm/tree-sitter@0.20.6/node_modules/tree-sitter: Running install script... node_modules/.pnpm/@curlconverter+tree-sitter-bash@0.0.3/node_modules/@curlconverter/tree-sitter-bash: Running install script, failed in 13.6s .../@curlconverter/tree-sitter-bash install$ prebuild-install || node-gyp rebuild │ prebuild-install warn install Request timed out │ C:\dev\zt-autotestweb\node_modules.pnpm\@curlconverter+tree-sitter-bash@0.0.3\node_modules\@curlconverter\tree-sitter-bash>if not defined npm_config_node_gyp (node "C:\Users\Administrator\AppData\Roami…
│ gyp info it worked if it ends with ok │ gyp info using node-gyp@9.4.0 │ gyp info using node@20.9.0 | win32 | x64 │ gyp info find Python using Python version 3.12.0 found at "C:\Users\Administrator\AppData\Local\Programs\Python\Python312\python.exe" │ gyp info find VS using VS2022 (17.3.32929.385) found at: │ gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools" │ gyp info find VS run with --verbose for detailed information │ gyp info spawn C:\Users\Administrator\AppData\Local\Programs\Python\Python312\python.exe │ gyp info spawn args [ │ gyp info spawn args 'C:\Users\Administrator\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-gyp\gyp\gyp_main.py', │ 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 'C:\dev\zt-autotestweb\node_modules\.pnpm\@curlconverter+tree-sitter-bash@0.0.3\node_modules\@curlconverter\tree-sitter-bash\build\config.gypi', │ gyp info spawn args '-I', │ gyp info spawn args 'C:\Users\Administrator\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-gyp\addon.gypi', │ gyp info spawn args '-I', │ gyp info spawn args 'C:\Users\Administrator\AppData\Local\node-gyp\Cache\20.9.0\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\Administrator\AppData\Local\node-gyp\Cache\20.9.0', │ gyp info spawn args '-Dnode_gyp_dir=C:\Users\Administrator\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-gyp', │ gyp info spawn args '-Dnode_lib_file=C:\\Users\\Administrator\\AppData\\Local\\node-gyp\\Cache\\20.9.0\\<(target_arch)\\node.lib', │ gyp info spawn args '-Dmodule_root_dir=C:\dev\zt-autotestweb\node_modules\.pnpm\@curlconverter+tree-sitter-bash@0.0.3\node_modules\@curlconverter\tree-sitter-bash', │ 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 'C:\dev\zt-autotestweb\node_modules\.pnpm\@curlconverter+tree-sitter-bash@0.0.3\node_modules\@curlconverter\tree-sitter-bash\build', │ gyp info spawn args '-Goutput_dir=.' │ gyp info spawn args ] │ Traceback (most recent call last): │ File "C:\Users\Administrator\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-gyp\gyp\gyp_main.py", line 42, in │ import gyp # noqa: E402 │ ^^^^^^^^^^ │ File "C:\Users\Administrator\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-gyp\gyp\pylib\gyp__init__.py", line 9, in │ import gyp.input │ File "C:\Users\Administrator\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 19, in │ 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 (C:\Users\Administrator\AppData\Roaming\npm\node_modules\pnpm\dist\node_modules\node-gyp\lib\configure.js:325:16) node_modules/.pnpm/tree-sitter@0.20.6/node_modules/tree-sitter: Running install script, failed in 13.6s

distutils is removed in Python 3.12 https://github.com/nodejs/node-gyp/issues/2869

verhovsky commented 3 months ago

You'll have to downgrade Python until https://github.com/prebuild/prebuild/issues/313 is fixed.