managing-python-dependencies

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

Updated Aug 26, 2026
One-click install
npx skills add https://github.com/Lathika-laa/Recipe_Box --skill managing-python-dependencies-lathika-laa
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: managing-python-dependencies
Source: https://github.com/Lathika-laa/Recipe_Box/tree/main/.github/.gemini/skills/managing-python-dependencies
Command: npx skills add https://github.com/Lathika-laa/Recipe_Box --skill managing-python-dependencies-lathika-laa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It prevents broken Python environments caused by running global pip install or mixing dependency managers, ensuring every package is installed through the tooling the project already uses. ## Core Features & Use Cases - Dependency Manager Detection: Checks for uv.lock, pyproject.toml, Pipfile, environment.yml, and requirements.txt in priority order to identify the correct tool (uv, Poetry, Pipenv, Conda, or venv + pip). - Safe Install Commands: Maps each detected manager to its proper install and setup commands, such as uv add <package> or poetry add <package>. - Default venv Workflow: Falls back to an isolated .venv with explicit .venv/bin/pip paths and pip freeze > requirements.txt when no manager is found. - Use Case: When adding a new third-party library to an existing Poetry project, the skill ensures poetry add is used instead of a global pip install that would corrupt the environment. ## Quick Start Ask the assistant to add a new Python package to your 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 breaking my project environment?▼

First detect the project's dependency manager by checking for files like uv.lock, pyproject.toml, Pipfile, environment.yml, or requirements.txt. Then use that tool's install command, such as uv add or poetry add, instead of a global pip install.

How to add dependencies to a Poetry project in Python?▼

Use poetry add <package> when the project contains a pyproject.toml with a [tool.poetry] section. Set up the environment with poetry install, and never mix in plain pip install commands.

What is the difference between uv, Poetry, Pipenv, and Conda for dependencies?▼

They are alternative Python dependency managers signaled by different files: uv.lock or [tool.uv] for uv, [tool.poetry] for Poetry, Pipfile for Pipenv, and environment.yml for Conda. Each has its own install command, and projects should stick to the one already in use.

Can I use pip install if my project only has requirements.txt?▼

Yes, but only inside a virtual environment using the explicit path .venv/bin/pip install <package>. After installing, run .venv/bin/pip freeze > requirements.txt to preserve the environment state.

Why is running global pip install a problem?▼

Global pip install modifies the system Python environment, causing version conflicts and overriding the project's established tooling. The rule is to never run pip install globally and never replace an existing dependency manager with a different one.