Brett Cannon <br...@python.org> added the comment:

> Surely "on native Windows you run venv-path\Scripts\activate[.ps1], on POSIX 
> you use source venv-path/bin/activate" isn't *that* hard for new users to 
> grok, and would cover the vast majority of users?

Sure, but how many times do we need to make people type, write, or say that 
exact line instead of a single line of "you activate by doing <command>"?

> So venv’s setup is consistent with the rest of Python.

Right, it's a Python-on-Windows thing, not a Windows thing itself to my 
knowledge.

> I think Brett is thinking about eliminating the manual activate part entirely

I'm actually after a single command to handle activation of a virtual 
environment. It's a point of friction on your first day of learning Python and 
I have seen it solved multiple times at this point by multiple tools. This 
seemed like a potential simple way to solve it to me, but apparently not 
everyone agrees. ;)

Now I realize that if we don't worry about the prompt changing it's actually 
very straight-forward, and so maybe proposing a simple `venv --activate <path>` 
that does nothing more than set those key environment variables and prints out 
a message about what is happening is enough to do the trick (and if people want 
the prompt to change they can tweak their shell configs to detect something 
like `__VENV_PROMPT__` being set and use it appropriately).

> Of course, scripts installed in venvs never need activation to run

Sure, but then that doesn't mean activation isn't convenient. :) Otherwise what 
is the point of having the activation scripts?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35003>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to