Quasar: Error when running 'quasar upgrade -i': "Can't find Python executable"

Created on 26 Oct 2019  ·  5Comments  ·  Source: quasarframework/quasar

I run quasar upgrade -i
Here's what I get:

c:\projects\my-app>quasar upgrade -i

  Quasar CLI · Gathering information with yarn...

 quasar: 1.2.2 → 1.2.6
 @quasar/app: 1.2.1 → 1.2.2

  Quasar CLI · Running "yarn add quasar@^1.2.6"

yarn add v1.19.1
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "vue@^2.0.0".
warning "emoji-mart-vue-fast > [email protected]" has unmet peer dependency "vue@^2.5.21".
warning "emoji-mart-vue-fast > vue-virtual-scroller > [email protected]" has unmet peer dependency "vue@^2.3.0".
warning "@quasar/quasar-app-extension-qmarkdown > [email protected]" has unmet peer dependency "webpack@^4.3.0".
warning " > [email protected]" has unmet peer dependency "webpack@^4.0.0".
warning " > [email protected]" has incorrect peer dependency "eslint@^5.0.0".
warning "eslint-plugin-vue > [email protected]" has incorrect peer dependency "eslint@^5.0.0".
[5/5] Building fresh packages...
[-/4] ⠄ waiting...
[-/4] ⠄ waiting...
[-/4] ⠄ waiting...
error c:\projects\my-app\node_modules\node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: c:\projects\my-app\node_modules\node-sass
Output:
Building: C:\Program Files\nodejs\node.exe c:\projects\my-app\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli   'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli   'c:\\projects\\my-app\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library='
gyp verb cli ]
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (c:\projects\my-app\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (c:\projects\my-app\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (c:\projects\my-app\node_modules\which\which.js:80:29)
gyp verb `which` failed     at c:\projects\my-app\node_modules\which\which.js:89:16
gyp verb `which` failed     at c:\projects\my-app\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at c:\projects\my-app\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:158:21)
gyp verb `which` failed  python2 Error: not found: python2
gyp verb `which` failed     at getNotFoundError (c:\projects\my-app\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (c:\projects\my-app\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (c:\projects\my-app\node_modules\which\which.js:80:29)
gyp verb `which` failed     at c:\projects\my-app\node_modules\which\which.js:89:16
gyp verb `which` failed     at c:\projects\my-app\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at c:\projects\my-app\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:158:21) {
gyp verb `which` failed   stack: 'Error: not found: python2\n' +
gyp verb `which` failed     '    at getNotFoundError (c:\\projects\\my-app\\node_modules\\which\\which.js:13:12)\n' +
gyp verb `which` failed     '    at F (c:\\projects\\my-app\\node_modules\\which\\which.js:68:19)\n' +
gyp verb `which` failed     '    at E (c:\\projects\\my-app\\node_modules\\which\\which.js:80:29)\n' +
gyp verb `which` failed     '    at c:\\projects\\my-app\\node_modules\\which\\which.js:89:16\n' +
gyp verb `which` failed     '    at c:\\projects\\my-app\\node_modules\\isexe\\index.js:42:5\n' +
gyp verb `which` failed     '    at c:\\projects\\my-app\\node_modules\\isexe\\windows.js:36:5\n' +
gyp verb `which` failed     '    at FSReqCallback.oncomplete (fs.js:158:21)',
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (c:\projects\my-app\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (c:\projects\my-app\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (c:\projects\my-app\node_modules\which\which.js:80:29)
gyp verb `which` failed     at c:\projects\my-app\node_modules\which\which.js:89:16
gyp verb `which` failed     at c:\projects\my-app\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at c:\projects\my-app\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:158:21)
gyp verb `which` failed  python Error: not found: python
gyp verb `which` failed     at getNotFoundError (c:\projects\my-app\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (c:\projects\my-app\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (c:\projects\my-app\node_modules\which\which.js:80:29)
gyp verb `which` failed     at c:\projects\my-app\node_modules\which\which.js:89:16
gyp verb `which` failed     at c:\projects\my-app\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at c:\projects\my-app\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:158:21) {
gyp verb `which` failed   stack: 'Error: not found: python\n' +
gyp verb `which` failed     '    at getNotFoundError (c:\\projects\\my-app\\node_modules\\which\\which.js:13:12)\n' +
gyp verb `which` failed     '    at F (c:\\projects\\my-app\\node_modules\\which\\which.js:68:19)\n' +
gyp verb `which` failed     '    at E (c:\\projects\\my-app\\node_modules\\which\\which.js:80:29)\n' +
gyp verb `which` failed     '    at c:\\projects\\my-app\\node_modules\\which\\which.js:89:16\n' +
gyp verb `which` failed     '    at c:\\projects\\my-app\\node_modules\\isexe\\index.js:42:5\n' +
gyp verb `which` failed     '    at c:\\projects\\my-app\\node_modules\\isexe\\windows.js:36:5\n' +
gyp verb `which` failed     '    at FSReqCallback.oncomplete (fs.js:158:21)',
gyp verb `which` failed   code: 'ENOENT'
gyp verb `which` failed }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". 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 "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (c:\projects\my-app\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (c:\projects\my-app\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack     at callback (c:\projects\my-app\node_modules\graceful-fs\polyfills.js:295:20)
gyp ERR! stack     at FSReqCallback.oncomplete (fs.js:158:21)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "c:\\projects\\my-app\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd c:\projects\my-app\node_modules\node-sass
gyp ERR! node -v v13.0.1
gyp ERR! node-gyp -v v3.8.0




  Quasar CLI · ⚠️  Command "yarn" failed with exit code: 1

Platform:
OS: Windows 10
Yarn: 1.19.1

bug

Most helpful comment

@ibrainventures
Yes, I understand that this is an upstream package issue, not quasar itself.
However, I posted it here because it happened when running quasar cli. I have never experienced any fatal errors using quasar cli before.
So I think the solution you gave will be useful for those who can come across this situation while using quasar cli.

All 5 comments

may those tipps can help for the system setup ?:

npm --add-python-to-path='true' --debug install --global windows-build-tools

https://github.com/JeremyEnglert/JointsWP/issues/317

npm --add-python-to-path='true' --debug install --global windows-build-tools
This fixed the problem, thank you!
Any ideas why it happened? I never experienced anything like this until trying to upgrade quasar to v1.2.5
Earlier there was never any need to install Python or Visual Studio or any 3rd part tools. Why it happened now and no word about this in docs?

Hi,

This is not related to Quasar's code.. Must be something upstream that changed.. We are not using Python anyway....

@apasov
this issue is not occured by the quasar .. it happens from the node-sass package, because the binarys are often only for linux systems builded, and the node must rebuild the windows package by runtime (at a update/upgrade) - if a update from a upstream package happens .. they are using python and the window setup has here some issues .. (it seems a known issue from node-sass and windows).

@ibrainventures
Yes, I understand that this is an upstream package issue, not quasar itself.
However, I posted it here because it happened when running quasar cli. I have never experienced any fatal errors using quasar cli before.
So I think the solution you gave will be useful for those who can come across this situation while using quasar cli.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mesqueeb picture mesqueeb  ·  3Comments

green-mike picture green-mike  ·  3Comments

jigarzon picture jigarzon  ·  3Comments

florensiuslaylim picture florensiuslaylim  ·  3Comments

jean-moldovan picture jean-moldovan  ·  3Comments