Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm config set python no longer supported by npm as of npm v9.0.0 #2798

Closed
davidmurdoch opened this issue Feb 15, 2023 · 7 comments
Closed
Milestone

Comments

@davidmurdoch
Copy link

See npm/cli#6126 for more details

@davidmurdoch davidmurdoch changed the title npm config set python no longer supported by npm as of v9 npm config set python no longer supported by npm as of npm v9.0.0 Feb 15, 2023
@amany9000
Copy link

Also facing the same issue, @davidmurdoch did you find any solutions

@davidmurdoch
Copy link
Author

Downgrading npm works (npm install npm@8 -g). In my case I was able to remove this step from our build process entirely and things just contributed to work perfectly fine 🤷‍♂️.

@stuartcusackie
Copy link

stuartcusackie commented Feb 17, 2023

I'm not sure if I'm having the same issue but Gyp seems to want to use Python 3, no matter what I do:
gyp info find Python using Python version 3.11.0 found at xxx

I downgraded to node-gyp@8 but that has the same problem as version 9.
Version 7 uses the correct Python version that I have set in my environment:
npm install node-gyp@7 -g

@cclauss
Copy link
Contributor

cclauss commented Feb 17, 2023

What is

the correct Python version that I have set

@stuartcusackie
Copy link

What is

the correct Python version that I have set

I mean Windows 11 Environment Variables. I have Python 2.7 higher up the load order than 3.x. Everything else follows this load order but node-gyp ignores it for some reason that I don't understand. Might be an unrelated issue...

@cclauss
Copy link
Contributor

cclauss commented Feb 17, 2023

https://github.com/nodejs/node-gyp#configuring-python-dependency

@lukekarrys
Copy link
Member

The docs here no longer recommend npm config set python since https://github.com/nodejs/node-gyp/pull/2880. There's nothing else to do for this in node-gyp, so I'm going to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants