activate script

The script inside a virtual environment that puts it first on PATH for the current shell session.

In more detail

On macOS and Linux run source .venv/bin/activate; on Windows run .venv\Scripts\activate. All it does is change PATH, set VIRTUAL_ENV and add the environment name to your prompt. deactivate undoes it; you can also skip activation and run .venv/bin/python directly.

Related terms

Taught in

References