pyshortcuts icon indicating copy to clipboard operation
pyshortcuts copied to clipboard

export PYTHONEXECUTABLE does not always end with bin/python

Open mockodin opened this issue 1 year ago • 1 comments

PYTHONEXECUTABLE should point at the output of sys.executable

Issue: bin/python does not always exist the default build for python will generate bin/python. i.e. bin/python3.10

Using sys.executable should be sufficient to set this variable.

mockodin avatar Apr 28 '23 19:04 mockodin

@mockodin. I believe PYTHONEXECUTABLE is used only on macOS, and is (perhaps "was") only important with Anaconda Python and then only because we actually run the python.app Python instead of the "real" Python because of weirdness with wxPython apps running Anaconda Python on MacOS.

Does that match with what you are doing (ie, using macOS and Anaconda)? If not, I'm not sure when or how PYTHONEXECUTABLE would be used.

In fact, I think there is a better workaround to the wxPython vs Anaconda-on-macOS and that we should just get rid of this hack and not set PYTHONEXECUTABLE, not rewrite the app, don't bother using python.app, but rather document how to fix wxPython apps running from Anaconda Python on macOS.

So, one question would be: what if we just remove setting PYTHONEXECUTABLE completely?

newville avatar Apr 28 '23 19:04 newville