question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: spawn C:\Python27\ ENOENT

See original GitHub issue

This is a

  • Bug Report
  • Feature Request
  • Other

I ran the command:

 nexe index.js --build

The code inside index.js is just a simple console.log("hello world");

And got the following output:

i nexe 2.0.0-rc.6
√ Node source extracted to: C:\Users\TACDF\Documents\projects\trial\.nexe\8.5.0
- Compiling result
Error: spawn C:\Python27\ ENOENT
    at _errnoException (util.js:1026:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19)
    at onErrorNT (internal/child_process.js:374:16)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
  • Platform(OS/Version): Running Windows 10 on Mac
  • Host Node Version: 8.5.0
  • Target Node Version: 8.5.0
  • Nexe version: 2.0.0-rc.6
  • Python Version: 2.7.14

I tried to set my environment variables correctly (added the python folder to PATH and created another environment variable for the python folder called PYTHON) but the issue still persists. Could you enlighten me on how to fix this issue?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
calebboydcommented, Oct 4, 2017

If you’re using nexe programmatically, pass python like shown above. Otherwise use --python

For example, nexe myapp.js --build --python C:/Python27

It sounds like you probably don’t really want/ need to build node though. So just leave that out and run nexe index.js

0reactions
pegvincommented, Oct 6, 2021

If you’re using nexe programmatically, pass python like shown above. Otherwise use --python

For example, nexe myapp.js --build --python C:/Python27

It sounds like you probably don’t really want/ need to build node though. So just leave that out and run nexe index.js

Thanks Alot Man!!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix "Error: spawn c:\Python\27\python.exe ENOENT"
I'm setting up a deployment folder to execute a number of grunt tools. When I use 'npm install' I'm coming across a number...
Read more >
Developers - Error: spawn C:\Python27\ ENOENT - - Bountysource
Error : spawn C:\Python27\ ENOENT · Platform(OS/Version): Running Windows 10 on Mac · Host Node Version: 8.5.0 · Target Node Version: 8.5.0 ·...
Read more >
How I fixed "Error: spawn python ENOENT" when upgrading
My instance got stuck in a reboot loop when I upgraded to node-red 3 saying “Error: spawn python ENOENT.” Turns out this is...
Read more >
How To Fix "Error: Spawn C:\Python\27\Python.Exe ... - ADocLib
I am using the VScode and just installed AREPL for pythons with virtualenv but I am getting the error Error: spawn python ENOENT....
Read more >
node-gyp should be able to find and use python - You.com
npm ERR! command sh -c node-gyp rebuild ... Then as node-gyp getting the python using "/usr/bin/python2.7" by spawn, spawn could not recognize the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found