[DOCS] The latest version of python (3.12) doesn't support node-gyp #7161
harshajk opened this issue · comments
Is there an existing issue for this?
I have searched the existing issues
This is a CLI Docs Problem, not another kind of Docs Problem.
This is a CLI Docs Problem.
Description of Problem
I am trying the below
npm install
However, I see the below error
npm ERR! ModuleNotFoundError: No module named 'distutils
Reason: The latest version of python (3.12) doesn't support node-gyp.
Potential Solution
node-gyp is currenlty supported only up to python version 3.11
Affected URL
https://www.npmjs.com/package/node-gyp#on-windows
Python 3.12 is fully supported on the current version of node-gyp
. Please see our automated tests.
https://github.com/search?q=repo%3Anodejs%2Fnode-gyp+distutils&type=issues
Going through the comments, does running the below command help fix the distutils error?
Link for the comment - #2869 (comment)
python3 -m pip install packaging
Let's vendor in
packaging
so that installingnode-gyp
does not require runningpip install packaging
.
We just include all the packaging
files in the node-gyp
release to avoid the support questions from Node.js users running pip
.
I added a clarification at the top of #2869 (comment)