Python Environment
Run Python through conda env codex; never use system Python or conda base. Use native output for ordinary UTF-8 commands and invoke Encoding Guard only for a real encoding boundary.
Execute Python
- Prefer
conda run -n codex python ...for portable commands. - An absolute interpreter is acceptable only after confirming it resolves to the
codexenvironment. - Run tests, scripts, build helpers, and package inspection in the same environment.
Manage dependencies
- Inspect the project's declared requirements, lockfiles, and existing environment before changing packages.
- Confirm the package or compatible version is actually missing.
- Prefer the project's declared installer. If none exists, use
python -m pipin envcodex. - Dry-run the smallest install that satisfies the task. Do not add broad upgrade flags.
- Stop if the resolver would remove, downgrade, or incompatibly upgrade existing packages.
- After installation, verify the import or command and run
python -m pip check.
Read dependency-management.md before installing, removing, upgrading, or repairing packages.