[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Python-Dev] PEP 394: Allow the `python` command to not be installed (and other minor edits)

On 28 April 2018 at 05:08, Nick Coghlan <ncoghlan at gmail.com> wrote:
> On 28 April 2018 at 12:34, Guido van Rossum <guido at python.org> wrote:
>> Um, the PEP has "Unix-Like Systems" in its heading, so discussing the
>> Windows situation seems out of scope to me.
> Sorry, I conflated two issues there - while PEP 394 itself is specific to
> Unix-like systems, my thoughts on where I'd like to take it in the future
> are mainly informed by my experiences helping to maintain the Python
> Packaging User Guide these days, where the current platform dependence of
> "How does a user run Python, pip, and pip-installed Python tools from the
> command line?" is a frequent source of problems for folks just starting out.
> (We really don't want to be maintaining separate "Windows instructions" and
> "everywhere else instructions" indefinitely, but that's where we are
> currently)

Strong +1 on this. I am not a Unix user, so my opinions on PEP 394 are
not relevant, but I agree with Nick that the current mess over "how to
write general instructions for a newcomer on how to run Python or
Python-related commands" is unsustainable. We have:

1. In a virtualenv - python
2. On windows - py (or "python" might work, if you're lucky, and it
may or may not work the same as "py")
3. On Unix - python3 (or if you have a self-installed Python, or
something like pyenv, "python" maybe, who knows).
4. If you're using something like Anaconda - quite likely "python",
but I'm not honestly sure except on Windows

And it's even worse once you get to something like pip: "pip", "pip3",
"python -m pip", "py -m pip", "python3 -m pip", ...

I don't want to push any particular solution here myself (my almost
exclusively Windows experience is too biased for me to understand the
trade-offs) but IMO, it's definitely something we need to solve.