-
Notifications
You must be signed in to change notification settings - Fork 237
Can't find Python executable "python" after installing #56
Comments
It's as if npm isn't even checking the value of PATH="$(dirname $(npm config get python)):$PATH" node_modules/.bin/electron-rebuild --arch x64 -f -p -w serialport -m electron-app |
Same issue here. |
+1 |
solution: nfroidure/ttf2woff2#28 |
Hm, seems like this is more with I'd gladly accept a PR for that, I'm not sure when I'll get to it. |
https://github.com/felixrieseberg/windows-build-tools/issues/33 npm --add-python-to-path='true' --debug install --global windows-build-tools |
npm config set python "c:\Python\27\python.exe" |
@ArminMa solution solved my issue! Had to run the CLI as administrator. |
@ArminMa's solution worked for me too! I first had Python version 3.6 for Windows installed on a Windows Server 2016 machine. I used the windows executable installation. This was required in order to install the web3 package. But no matter how I set path and environment variables, during the npm install of web3 it kept complaining it couldn't find the python executable. Typing python in the command prompt worked fine. I suspect it has to do with version/compatibility issues between web3 and python. After uninstalling the 3.6 version of python and installing 2.7 using the npm command ArminMa suggested it all works! I did update my environment variables (PYTHON and PATH) to the 2.7 executable. |
Thank guys, |
thanks arima |
Thanks @ArminMa |
thanks @aminma you save my day! |
Installing python 2.* worked for me. |
@garolion obrigado. Estive com esse problema por um bom tempo. Consegui corrigir com isso! 🥇 |
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 |
Executing: |
On windows: |
The problem is more fundamental than is mentioned here. A node module should not have a hard dependency on a build system like Python or MSBuild unless it can download one and install it without privileges locally or hold the user's hand. This package is a help but it doesn't solve the problem because if, for example, you need to install it from an admin account, it gets installed in the admin account which makes it unusable for the non-admin users. I had to delete where it was installed and then manually install the Python executable for all users, but the modify path didn't seem to do anything because it still didn't work. I then manually added the PYTHON environment variable before it would work. Thanks for this package but it should either have some more instructions, a better default example in the docs (and shouldn't be needed if people didn't make ridiculous node package like node_gyp)! |
Thank you so much @ArminMa! |
Special thanks goes to @ArminMa ! works for me! |
it works halfway for me after I install python I need to install visual studio_BuildTools manually and select few other package too . now its working fine |
it worked <3 |
@jeanru, this command destroyed my development machine. To fix this, remove npm env variables from ~/.npmrc |
If you ever come across the above error on windows: that's all... |
I just solved the problem by reading this article hope it helps !! |
Thanks Satish. |
Configuration: window 10, 64 bit, node v8.13.0, npm v6.4.1 Follow the below steps :
|
I had to re-install python 2.7 and change npm python config to:
|
For Ubuntu 18.04.4 LTS |
When i run
Still having the issue |
Its not working on Ubuntu:
Any ideas how to fix it on Linux? |
This module literally downloads and installs some Windows binaries (e.g. MS
Build Tools). It will not work on Linux (and is not needed in that case).
That is what this error message is trying to convey.
…On Fri, Dec 4, 2020, 8:03 AM Adam Nielsen ***@***.***> wrote:
Its not working on Ubuntu:
npm --add-python-to-path='true' --debug install --global windows-build-tools
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for ***@***.***: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! notsup Valid OS: win32
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: linux
npm ERR! notsup Actual Arch: x64
npm ERR! A complete log of this run can be found in:
npm ERR! /home/adam/.npm/_logs/2020-12-04T14_01_39_361Z-debug.log
Any ideas how to fix it on Linux?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#56 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMOZMYMNZHVUAGWOWP6I73STDT2XANCNFSM4DIVLJNQ>
.
|
@jacobq whoups. Just realized that I was actually missing Python at all.lol.. |
i think i love you. it worked man, thanks a lot! |
How did you fix it? i have the same problem on macos |
As the name |
run: npm cache clean --force |
Installing |
Thanks !! |
Installing python (for Windows) using Microsoft Store has helped me. |
after install windows build tools type |
node-gyp is failing because it can't find python.
windows-build-tools
did its thing and python is installed:Here's the output from
node-gyp
:The text was updated successfully, but these errors were encountered: