Below is the error that I get, when I try to generate a new project with JHipster:
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python C:\Program Files\Python36\python.EXE
gyp verb check python version `C:\Program Files\Python36\python.EXE -c "import platform; print(platform.python_version());"` returned: "3.6.4\r\n"
gyp verb could not find "C:\Program Files\Python36\python.EXE". checking python launcher
gyp verb could not find "C:\Program Files\Python36\python.EXE". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Program Files\Python36\python.EXE", you can set the PYTHON env variable.
The rest is the stacktrace. The weird thing is I do have python installed and the environment variable is also set. My python version is "Python 3.6.4". Should I run it in Python 2? Is that the case?
Yes node-gyp requires Python 2.7, so you could try the answers to this question.
Alternatively, if you encounter this problem, it is probably due to node-sass and if you did not select Sass in JHipster options, you don't need it but still you get it because it's a transitive dependency from Angular, you can skip it by setting environment variables:
set SKIP_SASS_BINARY_DOWNLOAD_FOR_CI=true
set SKIP_NODE_SASS_TESTS=true
Another alternative is to use JHipster devbox.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments