Outcome#
The training project runs in a dedicated environment whose dependencies are declared in Git while the environment directory itself remains untracked.
Concept#
Installing packages globally or into base makes projects interfere with one
another and prevents collaborators from reproducing the environment.
Worked Example#
Python runs from the project .venv and Git reports that .venv is ignored.
A correct example uses these decisions:
- Should .venv be committed? No. It is reproducible local state and must remain ignored.
- What proves the environment is active? The reported interpreter path is inside the project .venv.
Common Trap#
Creating the environment in Git-tracked files or installing into an unrelated global interpreter.
If Blocked#
Do not repeatedly reinstall into base. Record conda info --envs, the Python
path, and the exact error without credentials. Use the
reproducible Python lab or ask for
help before deleting an existing environment.
Useful references:
Understand Before Accepting AI Output#
An agent may suggest packages that are unnecessary, unmaintained, or fetched from an unapproved source. Review dependency purpose and project declarations before installation.