Skip to content

[DOCS] The latest version of python (3.12) doesn't support node-gyp #7161 #2966

Closed

Description

@harshajk

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

Activity

  1. cclauss commented on Jan 23, 2024

    @cclauss
    Contributor
  2. harshajk commented on Jan 24, 2024

    @harshajk
    Author

    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

  3. cclauss commented on Jan 24, 2024

    @cclauss
    Contributor

    Let's vendor in packaging so that installing node-gyp does not require running pip 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions