搜索

PythonReactSEOPDF
GitHub Skill

uv

how to run python files and mangage dependencies using UV package manager (pip replacement)

YoniChechik☆ 0 仓库 Stars0 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

You are working with a Python project that uses UV package manager. UV is a fast package manager serving as a drop-in replacement for pip, pip-tools, and virtualenv.

Core Commands

Project Setup

uv sync                           # Install all default AND dev dependencies from pyproject.toml

Running Commands

uv run python script.py           # Run Python with project dependencies

Adding Dependencies

uv add package-name               # Add to [project.dependencies]
uv add --dev package-name         # Add to [dependency-groups.dev]

CRITICAL: Anti-Patterns

NEVER use bare python

# FORBIDDEN:
python ...
python3 ...

INSTEAD: Always use uv run python ...

NEVER use pip

# FORBIDDEN:
uv pip ...
pip ...
python -m pip ...
uv run python -m pip ...

INSTEAD: Use uv add and uv sync

Instructions

When working with Python files in this project:

  1. Always use uv run python instead of bare python commands
  2. Install dependencies with uv add, never with pip
  3. Sync dependencies with uv sync after modifying pyproject.toml
  4. Run scripts and tools through uv run to ensure correct environment

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!