managing-python-dependencies

Detects project dependency managers and installs Python packages with the correct tooling.

9|Updated Jul 8, 2026
One-click install
npx skills add https://github.com/jerrylin96/dotgemini --skill managing-python-dependencies-jerrylin96
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: managing-python-dependencies
Source: https://github.com/jerrylin96/dotgemini/tree/main/skills/managing-python-dependencies
Command: npx skills add https://github.com/jerrylin96/dotgemini --skill managing-python-dependencies-jerrylin96

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It prevents accidental global pip install calls and conflicts caused by overriding a project's established dependency manager, ensuring Python packages are installed through the tooling the project already uses. ## Core Features & Use Cases - Dependency Manager Detection: Scans the workspace for signal files (uv.lock, pyproject.toml, Pipfile, environment.yml, requirements.txt) in priority order to identify the correct tool (uv, Poetry, Pipenv, Conda, or venv + pip). - Safe Default Workflow: Falls back to an isolated .venv with explicit .venv/bin/pip paths and requirements.txt freezing when no manager is detected. - macOS CPU-Only Review Environments: Optionally provisions hashed, per-workspace virtual environments that filter out CUDA/NVIDIA dependencies for local testing and linting on macOS. - Use Case: When asked to add httpx to a repository containing a uv.lock file, run uv add httpx instead of a global pip install httpx. ## Quick Start Ask the agent to add a Python package to the current project and it will detect the existing dependency manager and install it with the correct command.

Frequently Asked Questions about managing-python-dependencies

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I install a Python package without using global pip?

First detect the project's dependency manager from files like uv.lock, pyproject.toml, Pipfile, or requirements.txt, then use that tool's install command. If none exists, create a .venv and install with .venv/bin/pip, never the global pip.

How do I know which Python dependency manager a project uses?

Check for signal files in priority order: uv.lock or [tool.uv] in pyproject.toml means uv, [tool.poetry] means Poetry, Pipfile means Pipenv, environment.yml means Conda, and requirements.txt alone means venv plus pip.

Should I use uv or pip for a new Python project?

If the project already has a uv.lock or [tool.uv] configuration, use uv add and uv sync. For projects with no dependency manager, the default is venv plus pip with dependencies frozen into requirements.txt.

Can I run Python tests on macOS when the project requires CUDA dependencies?

Yes, use the opt-in review environment script setup_review_env.py, which builds a CPU-compatible virtual environment per workspace hash and filters out CUDA and NVIDIA packages. Then run tests via run_in_env.py with pytest or ruff.

Why is running pip install globally a problem?

Global pip installs bypass the project's declared dependency manager, causing version conflicts and unreproducible environments. Packages should always be installed through the detected project tooling or an isolated .venv.