python:uv

uv

python package manager Rust로 만들어진 초고속 Python 패키지 및 프로젝트 관리도구. uv.lock 파일로 의존성 고정

  • uv [OPTIONS] <COMMAND>
    • run: Run a command or script
    • init: Create a new project. 새로운 프로젝트로 생성(pyproject.toml, uv.lock 파일 생성)
    • add: Add dependencies to the project. 프로젝트에 의존성 추가
    • remove: Remove dependencies from the project
    • sync: Update the project's environment. 프로젝트 환경 업데이트
    • lock: Update the project's lockfile
    • export: Export the project's lockfile to an alternate format
    • tree: Display the project's dependency tree
    • tool: Run and install commands provided by Python packages
    • python: Manage Python versions and installations
    • pip: Manage Python packages with a pip-compatible interface .pip
    • venv: Create a virtual environment .venv
    • build: Build Python packages into source distributions and wheels
    • publish: Upload distributions to an index
    • cache: Manage uv's cache
    • self: Manage the uv executable
    • version: Read or update the project's version
    • help: Display documentation for a command
  • uv init path: 새로운 프로젝트 경로 생성
  • uv venv: 가상환경 생성
    uv venv .venv
  • source .venv/bin/activate 활성화
  • uv pip [<switches>…] <archive_name>
    • –system: 시스템에 설치
  • uv pip list –format=freeze > requirements.txt 의존성 파일 생성.
    uv pip freeze > requriements.txt
  • uv pip compile pyproject.toml -o requirements.txt 의존성 해소 및 고정
  • uv pip sync requirements.txt 고정된 버전으로 환경 동기화
  • uv add -r requriments.txt 의존성 추가
  • uv sync requriments.txt 의존성 업데이트(삭제 포함)
An extremely fast Python package manager.
 
Usage: uv [OPTIONS] <COMMAND>
 
Commands:
  run      Run a command or script
  init     Create a new project
  add      Add dependencies to the project
  remove   Remove dependencies from the project
  sync     Update the project's environment
  lock     Update the project's lockfile
  export   Export the project's lockfile to an alternate format
  tree     Display the project's dependency tree
  tool     Run and install commands provided by Python packages
  python   Manage Python versions and installations
  pip      Manage Python packages with a pip-compatible interface
  venv     Create a virtual environment
  build    Build Python packages into source distributions and wheels
  publish  Upload distributions to an index
  cache    Manage uv's cache
  self     Manage the uv executable
  version  Read or update the project's version
  help     Display documentation for a command
 
Cache options:
  -n, --no-cache               Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation [env: UV_NO_CACHE=]
      --cache-dir <CACHE_DIR>  Path to the cache directory [env: UV_CACHE_DIR=]
 
Python options:
  --managed-python       Require use of uv-managed Python versions [env: UV_MANAGED_PYTHON=]
  --no-managed-python    Disable use of uv-managed Python versions [env: UV_NO_MANAGED_PYTHON=]
  --no-python-downloads  Disable automatic downloads of Python. [env: "UV_PYTHON_DOWNLOADS=never"]
 
Global options:
  -q, --quiet...                                   Use quiet output
  -v, --verbose...                                 Use verbose output
      --color <COLOR_CHOICE>                       Control the use of color in output [possible values: auto, always, never]
      --native-tls                                 Whether to load TLS certificates from the platform's native certificate store [env: UV_NATIVE_TLS=]
      --offline                                    Disable network access [env: UV_OFFLINE=]
      --allow-insecure-host <ALLOW_INSECURE_HOST>  Allow insecure connections to a host [env: UV_INSECURE_HOST=]
      --no-progress                                Hide all progress outputs [env: UV_NO_PROGRESS=]
      --directory <DIRECTORY>                      Change to the given directory prior to running the command
      --project <PROJECT>                          Run the command within the given project directory [env: UV_PROJECT=]
      --config-file <CONFIG_FILE>                  The path to a `uv.toml` file to use for configuration [env: UV_CONFIG_FILE=]
      --no-config                                  Avoid discovering configuration files (`pyproject.toml`, `uv.toml`) [env: UV_NO_CONFIG=]
  -h, --help                                       Display the concise help for this command
  -V, --version                                    Display the uv version
 
Use `uv help` for more details.
  • python/uv.txt
  • 마지막으로 수정됨: 2026/04/03 00:48
  • 저자 writer