title: How to fix ‘Error: Can't find Python executable "python", you can set the PYTHON env variable.” ubuntu nodejs npm
body: <p>npm install</p>
  
  <blockquote>
    <p>diskusage@0.2.6 install /home/brian/Product/Just-Done-Product/justdone-core/node_modules/diskusage
    node-gyp rebuild</p>
  </blockquote>
  
  <pre><code>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 (/home/brian/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:484:19)
  gyp ERR! stack     at PythonFinder.&lt;anonymous&gt; (/home/brian/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:406:16)
  gyp ERR! stack     at F (/home/brian/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/which/which.js:68:16)
  gyp ERR! stack     at E (/home/brian/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/which/which.js:80:29)
  gyp ERR! stack     at /home/brian/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/which/which.js:89:16
  gyp ERR! stack     at /home/brian/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/isexe/index.js:42:5
  gyp ERR! stack     at /home/brian/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
  gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:153:21)
  gyp ERR! System Linux 5.0.0-16-generic
  gyp ERR! command "/home/brian/.nvm/versions/node/v10.16.0/bin/node" "/home/brian/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
  gyp ERR! cwd /home/brian/Product/Just-Done-Product/justdone-core/node_modules/diskusage
  gyp ERR! node -v v10.16.0
  gyp ERR! node-gyp -v v3.8.0
  gyp ERR! not ok 
  npm WARN justdone-core@1.0.0 No repository field.
  npm WARN justdone-core@1.0.0 No license field.
  
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! diskusage@0.2.6 install: `node-gyp rebuild`
  npm ERR! Exit status 1
  npm ERR! 
  npm ERR! Failed at the diskusage@0.2.6 install script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /home/brian/.npm/_logs/2019-06-16T05_51_47_749Z-debug.log
  </code></pre>