Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python-tools was unable to find your machine's python executable. Please try set the path in package settings and then restart atom. If the issue persists please post an issue on https://github.com/michaelaquilina/python-tools/issues/new #293

Open
Aung-Bo-Bo007 opened this issue Mar 25, 2022 · 5 comments

Comments

@Aung-Bo-Bo007
Copy link

Error: spawn python ENOENT

@vsenn
Copy link

vsenn commented Apr 3, 2022

same issue last few days

@vagabond92
Copy link

I only get this issue when launching from spotlight. If I launch from terminal, everything works fine.

@vsenn
Copy link

vsenn commented Apr 6, 2022

I only get this issue when launching from spotlight. If I launch from terminal, everything works fine.

LoL. Confirmed. Running Atom from Spotlight or Dock raise the above issue, Terminal atom command not. Thank you a lot for the workaround!

@danielholmhansen
Copy link

Workaround does not fix his. I have even tried to put in path, but still no luck

@esba1ley
Copy link

esba1ley commented May 19, 2022

Same issue. When I launch from terminal using command line tool, no error. When I launch from Spotlight, Dock, or double-clicking the application icon via Finder.app, I get the "can't find Python executable error" for python-tools.

Interestingly enough, when I check the environment using the Atom DevTools console using process.env, the following differences show up:

on the shell-executed Atom, the following exist that don't from the Finder-executed Atom:
ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT: "true"
LANG: "en_US.UTF-8"
LaunchInstanceID: (hexadecimal ID of format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
SECURITYSESSSIONID: (hexadecimal ID of format xxxxx)
TERM: "xterm-256color"
TERM_PROGRAM: "Apple_Terminal"
TERM_PROGRAM_VERSION: "444"
TERM_SESSION_ID: (hexadecimal ID of format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)

The following exist on the Finder-launched Atom that do not from the shell-launched Atom:
OLDPWD: "/"
_: "/usr/bin/awk"
_CE_CONDA: ""
_CE_M: ""
__CFBundleIdentifier: "com.github.atom"
__CF_USER_TEXT_ENCODING: "0x1F6:0x0:0x0"

Other differences:
LC_CTYPE: "en_US.UTF-8" from shell-launched, is "" from Finder-launched
PATH from shell-launched starts with a colon, from the Finder-launched it does not.
PWD: is the directory from which Atom was launched via the shell, is "/" from Finder.
SHLVL: "2" from shell-launched, SHLVL: "0" from Finder-launched.
XPC_SERVICE_NAME: has a hexID of format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX appended on the end from the shell-launched, not in the Finder-launched

So environmentally speaking, on MacOS 12.3.1 (Monterey), those are the environment differences seen by Atom depending on whether or not the user launches it from the shell or the Finder. I use miniconda3 to manage my virtual environments, and in both launch types, the CONDA* variables are identical, and are the appropriate environments I want Atom to pick up from a default shell. When I change the conda env at the command line and launch Atom in the same shell, I get the new conda env to which I set that shell... so that works.

Hopefully, this helps with debugging. I found it interesting that the Atom/Electron/Chromium dev tools prompt isn't mentioned in the Atom documentation... it REALLY helps debug environmental things like this.

For now, I launch from the shell using the "atom" command and all is well. It would be nice if we could use the MacOS Finder/Spotlight/Dock provided ways of launching, too...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants