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

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

Open
trbielec opened this issue May 21, 2020 · 1 comment

Comments

@trbielec
Copy link

trbielec commented May 21, 2020

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:

  • imports were throwing errors even though the python3 command-line interpreter was okay with them
  • print(sys.version) in my script was showing 2.7 but... which python3 in Terminal was showing 3.8
  • the package Script Configure Run Options command was then set to python3 but... print(sys.version) in my script was showing 3.7

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.

@trbielec trbielec changed the title Add package setting for switching or defaulting python interpreter default to python3 Add package setting for switching python interpreter from python to python3 May 22, 2020
@Paullux21
Copy link

THIS SHOULD BE TAKEN CARE OF ALREADY!!!

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

2 participants