atom-community / atom-script

:runner: Run ( scripts | selections | source ) in Atom
https://atom.io/packages/script
MIT License
733 stars 269 forks source link

Add package setting for switching python interpreter from python to python3 #2143

Open trbielec opened 4 years ago

trbielec commented 4 years ago

TL;DR - usability for new coders is lacking due to Python3 being a sidenote buried in the readme

Thank you for Atom-Script, I use this all the time, which is why this issue is frustrating. See related issues like #1797 #1466 (comment)

As a python novice, due to using Homebrew, my PATH included different variations of Python 2.7, 3.7, and 3.8 (it's a mess but highlights the issue below).

I'm trying to use the latest version of Python on my system, 3.8. I was deeply confused why basic scripts (without interpreter headers) had errors:

Again, as a novice, I wasn't sure if the issue was maybe due to ZSH or Atom's shell, or using the wrong run options, or if I could somehow change the Atom python interpreter. I now see that the Atom-Script Readme contains a solution to manually change the config files #1787... however:

  1. It's in the wrong part of the Readme. It should be under "Atom can't find node | ruby | python | my socks". The link to workarounds under this heading seemed like the place to go for this solution but I didn't find it there.
  2. Manually changing config files with a simple replacement is a prime example of something worth providing a UI option for. It's where I go when I install a new package, and it's not mentioned in the options at all even though it's hard-baked into the package configuration
  3. Is it possible that this config setting will be reversed when Atom-Script updates? I have no idea.

My messy PATH is clearly one issue that I should look into resolving, but I think the following solution would benefit more users. There are probably a bunch of people like me entering "python3" into command every time they run a script, like #1466:

Please provide a simple checkbox/dropdown option in the package settings specifically for changing python to python3 in the package configuration. Even better, make that option default.

Paullux21 commented 2 years ago

THIS SHOULD BE TAKEN CARE OF ALREADY!!!