title: Python and Node Js (what to do if the client doesn't have python)
body: <p>I am trying to make a desktop application with NodeJs (electron) and I want to be able to also implement python scripts using Child Process in Node, but I would like to know what I can do to control when a user does not have Python installed on their machine. Any way to install python to the client without having to do it manually, or if you have a different version installed do not have conflicts; or to compile the .py so that Python is not needed?</p>
  <pre><code>const { spawn } = require(&quot;child_process&quot;);
  
  const process = spawn(&quot;python&quot;, [&quot;fileController.py&quot;]);
  
  process.stdout.on(&quot;data&quot;, (data) =&gt; {
  console.log(`stdout: ${data}`);
  });
  
  process.stderr.on(&quot;data&quot;, (data) =&gt; {
  console.error(`stderr: ${data}`);
  });
  
  process.on(&quot;close&quot;, (code) =&gt; {
  console.log(`Exited with code ${code}`);
  });
  </code></pre>