-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
gyp can't find Python, despite Python running when you type "python" #1268
Comments
node-gyp (or rather, gyp) needs python 2.7, python 3.x won't work. |
That sounds... weird, in 2017? It's been many, many years by now for codebases to update to something that will run just fine on modern python. But, if you're right: the error does not in any way mention this, so if that's really the problem the error message needs to be changed here so that users understand what's wrong and can address that. (I don't use python except for my work, and all that work involves Python 3. so as a JS developer I have no reason to install an older version of Python unless something tells me it needs it) |
@pomex, I do agree that the error should be more informative. So I opened #1269 Just for general context, for several reasons (which we try very hard to avoid in |
@Pomax same error i am getting how to fix this issue.. did you fixed this issue in your case?? |
In case anyone else lands here looking for the solution to this and wants to subscribe to the Python 3 support issue, it's #1337 |
I have faced and fixed this issue relates node-sass and python error.Try installing latest angular cli command with the steps below Set the system variable path as well: C:\Users\windowsusername\AppData\Roaming\npm\node_modules@angular\cli\bin; C:\Program Files\nodejs; Then start using angular cli command prompt using: angular client project folder path>npm install -g node-gyp |
It looks like the PythonFinder is broken for some reason. It just pop up an error that say it can't find the executable at "C:\Program_Files\Python\Python36\python.exe". This is wired,hah. The executable just here and it just can't find it??? After a little debug,I found it just go into the guessPython function and trying to find the "C:\python27\python.exe" and show with a "C:\Program_Files\Python\Python36\python.exe" misleading error message. |
Installing Python 2.7.15 fixed this for me... |
It's 2018, and this is still an issue. This issue is becoming even bigger as Python2 is being phased out (It can't even be downloaded from the front page anymore, you have to go through "other downloads" on python.org), this is something that needs fixing. |
There's a PR for this, but the maintainers don't seem to care: #1335 |
any news ? |
THIS IS SO IRRITATING.... |
I had the same issue but I resolved it by adding the system variables paths like @SatishMHiremath explained above and then moved these paths to the top of the list (very important) Set the system variable path as well: Make sure these paths are at the top of the list instead of the default bottom |
@imimdou A workaround for now, but doesn't change the fact that gyp is using outdated python to run, not to mention that this is not an error that affects just angular - it's much more generic in nature. |
2 < 3 |
The “separate but equal” thing is outdated anyway, it was true when written but as @golyalpha mentions later py2 is now being phased out and no longer supported. |
If someone wondering where that python path is stored |
this is exact reason why I HATE so much that so called Open-Lunatic-Broken-Source-Community |
@jalle007 I know that it can be frustrating to wait for an issue to be resolved, but this is being worked on and comments that only voice such frustration are not helpful. |
@addaleax that is to be expected though, innit? Look at the issue opening date! Not to mention, the issue got closed without a proper fix... |
At least for the next 9 months, 30 days, 2 hours, and 16 minutes. |
i think i fixed this by installing python as python v2 |
@ORESoftware Yes, that is a workaround, currently, but we're getting closer and closer to Python 2 being EOL, so gyp desperately needs to be updated. |
This worked for me:
|
For those coming to this thread still, I fixed this issue. I'm not sure which combination of these steps worked, but the final 2 steps are critical.
|
open Powershell with administrator privileges and run this command, then proceed with bcrypt installation Windows: npm install --global --production windows-build-tools |
|
I'm trying to install windows-registry on Windows 10 with Node 8.2.1 and NPM 5.3.0, and when the
ref
dependency is hit, node-gyp kicks in. However, it seems to fail when it tries to run python, despite the fact that python has a PATH entry and will run perfectly fine both when just executing "python" on the command line, or when exec/spawning a command called "python".The error log is as follows:
I don't understand why there would be any reason to be looking for Python in the indicated locations when there is already a PATH binding that makes python run just fine:
But even then, that is the correct location as is evidenced by:
And even node will happily run "python" through exec/spawn:
The text was updated successfully, but these errors were encountered: