atom-community / atom-community/atom-script

Add package setting for switching python interpreter from python to python3

Open
#2,143 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
730
Forks
264
PR merge metrics
No merged PRs in 30d

Description

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](https://github.com/rgbkrk/atom-script/issues/1466#issuecomment-400509381))

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.**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.