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

Python executable not found #1536

Closed
DrYSG opened this issue Aug 29, 2018 · 7 comments
Closed

Python executable not found #1536

DrYSG opened this issue Aug 29, 2018 · 7 comments

Comments

@DrYSG
Copy link

DrYSG commented Aug 29, 2018

I have read https://stackoverflow.com/questions/47508990/cant-find-python-executable and that is still not working for me.

I have tried putting in my .npmrc either

  • python=D:\Program Files (x86)\Python37-32\python.exe
  • python=D:\Program Files (x86)\Python37-32

An while the python.exe certainly is there, (and is on my windows PATH variable).

I still get:

    gyp ERR! configure error
    gyp ERR! stack Error: Can't find Python executable "D:\Program Files (x86)\Python37-32\python.exe", you can set the PYTHON env variable.
    gyp ERR! stack     at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:492:19)
    gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:517:16)
    gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
    gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
    gyp ERR! System Windows_NT 10.0.14393
    gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
    gyp ERR! cwd D:\Source\Orchestrator\orchestrator\node_modules\nanomsg
@bzoz
Copy link
Contributor

bzoz commented Aug 29, 2018

You need Python 2.x, version 3 is not supported.

@DrYSG DrYSG closed this as completed Aug 30, 2018
@DrYSG
Copy link
Author

DrYSG commented Aug 30, 2018

Ok, but why does the error read that it cannot find the python executable?

@DrYSG DrYSG reopened this Aug 30, 2018
@bzoz
Copy link
Contributor

bzoz commented Aug 30, 2018

Because it is looking for Python 2, cannot find it, so the error message says Can't find Python executable. This can be improved, in Node we made it so it displays something like:

Python found in D:\Program Files (x86)\Python37-32\python.exe but it is not v2.x.

PRs are always welcomed.

@DrYSG
Copy link
Author

DrYSG commented Aug 30, 2018

If you are detecting it is the wrong version in NPM, can it not put out the same message as in "Node" (I guess I don't appreciate the distinction)

@richardlau
Copy link
Member

There's this PR to modify the error message: #1269

@DrYSG
Copy link
Author

DrYSG commented Aug 30, 2018

added this to my .npmrc and it works. Maybe this could be in the readme?

python=D:\Program Files (x86)\Python27\python.exe

@DrYSG DrYSG closed this as completed Aug 30, 2018
@pravintamil
Copy link

I got an error Can't find python executable while configuring

image

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

4 participants