To solve this problem, check if the directory in which you are installing or any its ancestors don't have a space in their name. I had the same problem and I had one of the parent directories in which I was installing to have a space in it, renamed the directory to remove the space and make
ran successfully.
Referred to the following when I faced this error: