-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
node-gyp configure error "Python is not set from command line or npm configuration" #2664
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
Comments
Python 2 died 862 days ago on 1/1/2020 so it is no longer supported. You need a supported version of Python: https://devguide.python.org/#status-of-python-branches On your Mac, please let us know what it says when you do: |
I installed Python3 with Brew but it either did not work or node-gyp does not seem to find it.
|
Mine says:
so you are on an older macOS. What do you get when you type:
|
It says: |
Please try to add to your command:
Like:
|
I tried the 3 commands listed but I always get the same error:
This is weird because I installed python3 but I cannot find the path to it on my mac. When I type |
|
This is what I get when I run
|
Do this...
Open a new terminal window / tab and then |
Opening a new terminal did make things better. When I enter
|
Much better.
You need that file even if it is empty. |
Thanks, it worked! |
The Python@3.10 thing is about https://stackoverflow.com/questions/70587544 |
How I fixed the issue.
Then fix .zshrc: And add:
|
If you had to do |
@cclauss where should I create this file? |
gyp ERR! find Python Python is not set from command line or npm configuration gyp ERR! find Python Python is not set from environment variable PYTHON gyp ERR! find Python checking if "python3" can be used gyp ERR! find Python - "python3" is not in PATH or produced an error gyp ERR! find Python checking if "python" can be used gyp ERR! find Python - "python" is not in PATH or produced an error gyp ERR! find Python gyp ERR! find Python ********************************************************** gyp ERR! find Python You need to install the latest version of Python. gyp ERR! find Python Node-gyp should be able to find and use Python. If not, gyp ERR! find Python you can try one of the following options: gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable" gyp ERR! find Python (accepted by both node-gyp and npm) gyp ERR! find Python - Set the environment variable PYTHON gyp ERR! find Python - Set the npm configuration variable python: gyp ERR! find Python npm config set python "/path/to/pythonexecutable" gyp ERR! find Python For more information consult the documentation at: gyp ERR! find Python https://github.com/nodejs/node-gyp#installation |
In my case, I just had to downgrade node:
|
Target: x86_64-apple-darwin18.7.0
Thread model: posix
node-gyp configure
The text was updated successfully, but these errors were encountered: