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

Install Error: Can't find Python executable #28

Closed
Shoplifter opened this issue Aug 23, 2016 · 14 comments
Closed

Install Error: Can't find Python executable #28

Shoplifter opened this issue Aug 23, 2016 · 14 comments

Comments

@Shoplifter
Copy link

I got this error when installing ttf2woff2 on Win10, node 4.50 and npm 3.10.6

> (node-gyp rebuild > builderror.log) || (exit 0)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at failNoPython (C:\Users\xxxx\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:449:14)
gyp ERR! stack     at C:\Users\xxxx\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:404:11
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\xxxx\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\xxxx\AppData\Roaming\npm\node_modules\ttf2woff2
gyp ERR! node -v v4.5.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok

also tried to install node-gyp manually, but still didnt work out.

@nfroidure
Copy link
Owner

A lot of issue were submitted on windows builds, you definitely should review them https://github.com/nfroidure/ttf2woff2/issues?q=is%3Aissue+is%3Aclosed

@Shoplifter
Copy link
Author

Thank you for putting me on the right track.
https://github.com/nodejs/node-gyp#installation showed me what to do.
npm install --global --production windows-build-tools
and re-installed npm install ttf2woff2 -g
everything's fine now.

@ArminMa
Copy link

ArminMa commented Jun 15, 2017

https://github.com/felixrieseberg/windows-build-tools/issues/33

npm --add-python-to-path='true' --debug install --global windows-build-tools

@nfroidure
Copy link
Owner

Thanks for sharing ;)

@jeanru
Copy link

jeanru commented Sep 6, 2017

npm config set python "c:\Python\27\python.exe"

@ajay-nagarro
Copy link

Thank you @ArminMa @jeanru

@LenkaLancaric
Copy link

Hi,

I'm trying to install Angular by running npm install -g @angular/cli

I have this error:-

C:\Users<MyUsername>\AppData\Roaming\npm\ng -> C:\Users<MyUsername>\AppData\Roaming\npm\node_modules@angular\cli\bin\ng

[email protected] install C:\Users\lancaril\AppData\Roaming\npm\node_modules@angular\cli\node_modules\node-sass
node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.7.2/win32-x64-59_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.7.2/win32-x64-59_binding.node":

tunneling socket could not be established, statusCode=407

Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.

  export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

  npm config set proxy http://example.com:8080

.
.
.
.
.

I have configured both proxy and https-proxy variables to my proxy yet the error persists.

Any ideas?

Thanks in advance

@LenkaLancaric
Copy link

Sorry, this is the command I ran:

npm install -g @angular/cli

@SatishMHiremath
Copy link

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

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 @angular/cli@latest

angular client project folder path>npm install -g node-gyp

@zhuweiyou
Copy link

Thank you @ArminMa @jeanru

@AnClark
Copy link

AnClark commented Jun 7, 2018

npm config set python F:\Python\python.exe doesn't work even I surely have a Python 3.5 installed there. (As currently gyp really doesn't support Python version > 3.0.)

@vishrantgupta
Copy link

This might help

https://stackoverflow.com/questions/15126050/running-python-on-windows-for-node-js-dependencies

@kolya182
Copy link

npm config set python "/usr/local/bin/python" fixed the problem for me on macOS Mojave.

@EddyVinck
Copy link

EddyVinck commented Jul 19, 2019

I tried fixing it on Ubuntu / Linux, but now my yarn is taking really long so I probably broke something. Leaving this here for reference so I can look into it later, but DO NOT do this.

# do NOT run this
$ apt install python2.7
$ npm config set python /usr/bin/python2.7

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