You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before you can start installing or using packages in your virtual environment you’ll need to activate it.
While a virtual environment is activated, pip will install packages into that specific environment.
Activating a virtual environment will put the virtual environment-specific python and pip executables into your
shell's PATH.
Could these parts be updated as well? They are incorrect and actively misleading, leading to a lot of misunderstandings. A virtual environment can be used without activation. It depends on how / which pip is used. It would be fantastic if this guide could explain that in slightly more detail: Explicitly explain that activating is only (one way of) putting the the virtual environment-specific python and pip executables into the current shell's PATH. Specifying that path explicitly is also possible and often easier, preferred, clearer, more robust. The leaky abstraction "activation" and the lack of such an explanation is mystifying things unnecessarily, and leads to many problems and much confusion.
We might need to consider that some things might rely on the presence of the VIRTUAL_ENV environment variable, which is set when activating a virtual environment.
The The Python Launcher for Unix is also aware of VIRUAL_ENVhttps://python-launcher.app/#activated-virtual-environment
but also notes "In general, this feature is not needed. If you create a virtual environment in the current directory in a .venv directory, the Python Launcher will automatically use that. ... Otherwise it will search the parent directory, and so on, until it finds a .venv directory"
I think .venv directories are not automatically used by the Windows py launcher yet.
Could these parts be updated as well? They are incorrect and actively misleading, leading to a lot of misunderstandings. A virtual environment can be used without activation. It depends on how / which pip is used. It would be fantastic if this guide could explain that in slightly more detail: Explicitly explain that activating is only (one way of) putting the the virtual environment-specific
python
andpip
executables into the current shell'sPATH
. Specifying that path explicitly is also possible and often easier, preferred, clearer, more robust. The leaky abstraction "activation" and the lack of such an explanation is mystifying things unnecessarily, and leads to many problems and much confusion.Originally posted by @petsuter in #1338 (comment)
The text was updated successfully, but these errors were encountered: