Message357649
> 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? |
|
Date |
User |
Action |
Args |
2019-11-29 18:38:57 | brett.cannon | set | recipients:
+ brett.cannon, vinay.sajip, uranusjr, DamlaAltun |
2019-11-29 18:38:57 | brett.cannon | set | messageid: <1575052737.89.0.605933008485.issue35003@roundup.psfhosted.org> |
2019-11-29 18:38:57 | brett.cannon | link | issue35003 messages |
2019-11-29 18:38:57 | brett.cannon | create | |
|