Environment and dependency commands
Learn in depth →A virtual environment isolates an interpreter environment and its installed packages.
python -m venv .venv
python -m pip install package
python -m pip --versionExample
import sys
print(isinstance(sys.executable, str))Result
True
Watch for: Activate using the command for your shell, or invoke the environment interpreter explicitly. Confirm which interpreter pip installs into.
Practise this topic →