# managing-python-dependencies

> Claude/Codex skill by [@googlecloudplatform](https://omgskills.com/library/googlecloudplatform/index.md) · 226 stars · Updated 2026-10-23

Ensures proper Python dependency management, avoiding global \`pip install\` and adhering to project-specific tooling. Use this skill if any of the following are true: 1. Attempting to run \`pip install {package\_name}\`. 2. Python packages or dependencies need to be added or modified. 3. Initiating a new Python project. 4. Installing missing packages inside a notebook or Python project. 5. Generating Python code that includes \`import\` statements for third-party libraries. 6. Before executing Python scripts via the terminal to ensure the correct virtual environment is active.

## Install

```sh
git clone https://github.com/GoogleCloudPlatform/data-agent-kit-plugin /tmp/data-agent-kit-plugin && ln -s /tmp/data-agent-kit-plugin/skills/managing-python-dependencies ~/.claude/skills/managing-python-dependencies
```

## From README

Python Dependency Management Rule \[!CAUTION\] BEFORE any pip You MUST first detect the project's existing dependency manager and use it correctly. Do NOT override the project's established tooling. \[!NOTE\] Reactive Environment Check Bundling (Only When Installing): Do NOT run environment or package availability checks (importlib.util.findspec, pip list, ls uv.lock...) proactively before writing code or creating a notebook. Only probe the environment when a package actually needs to be installed (for example, on ModuleNotFoundError / ImportError or an explicit user request to dependencies). In Notebooks: When a notebook cell execution tool (executecell / notebookexecutecell) is available, check package availability (import or %pip list) and missing packages (%pip ) inside notebook cells, never via python3 -c or pip in the shell.

## Links

- HTML page: https://omgskills.com/library/googlecloudplatform/data-agent-kit-plugin/skills/managing-python-dependencies/
- GitHub: https://github.com/GoogleCloudPlatform/data-agent-kit-plugin
- Author: [@googlecloudplatform](https://omgskills.com/library/googlecloudplatform/index.md)

## More from this repo

- [accidental-data-loss-prevention](https://omgskills.com/library/googlecloudplatform/data-agent-kit-plugin/skills/accidental-data-loss-prevention/index.md) — \*\*STOP AND VERIFY\*\*: Before running any command or tool that results in irreversible data loss, you MUST obtain...
   - [@googlecloudplatform](https://omgskills.com/library/googlecloudplatform/index.md) · 226 stars
- [bigquery-ai-ml](https://omgskills.com/library/googlecloudplatform/data-agent-kit-plugin/skills/bigquery-ai-ml/index.md) — Leverages BigQuery's built-in machine learning and GenAI capabilities for advanced data analytics.
   - [@googlecloudplatform](https://omgskills.com/library/googlecloudplatform/index.md) · 226 stars
- [bigquery-bigframes](https://omgskills.com/library/googlecloudplatform/data-agent-kit-plugin/skills/bigquery-bigframes/index.md) — Generates Python code using BigQuery DataFrames (BigFrames).
   - [@googlecloudplatform](https://omgskills.com/library/googlecloudplatform/index.md) · 226 stars
