'Not able to install node@10 on mac M1 chip device

System

enter image description here

I have a project which requires node@10 to run. I used https://brew.sh to install node@10.

I used the below command to install node@10

brew install --build-from-source node@10

It was not able to install and i got the following error.

./configure: line 3: exec: python: not found

I installed python using brew.

brew install python

The above command installed python3, so i created alias for python

alias python=python3

enter image description here

So, python is working. I again tried brew install --build-from-source node@10 and still getting enter image description here



Solution 1:[1]

I don't have enough rep to comment so I'll try to phrase this as an answer:

Chances are there is a messed up symlink somewhere

  1. Usually you can use brew info python to troubleshoot your python install with homebrew installs.
  2. Also use which python at the terminal to see the actual path to the python executable.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rino Bino