Skip to content

Features機能

uv provides essential features for Python development — from installing Python and hacking on simple scripts to working on large projects that support multiple Python versions and platforms.uvは、Pythonのインストールや簡単なスクリプトのハッキングから、複数のPythonバージョンとプラットフォームをサポートする大規模プロジェクトの作業まで、Python開発に必要な基本機能を提供します。

uv's interface can be broken down into sections, which are usable independently or together.uvのインターフェースは、独立してまたは一緒に使用できるセクションに分けることができます。

Python versionsPythonのバージョン

Installing and managing Python itself.Python自体のインストールと管理。

  • uv python install: Install Python versions.uv python install: Pythonのバージョンをインストールします。
  • uv python list: View available Python versions.uv python list: 利用可能なPythonのバージョンを表示します。
  • uv python find: Find an installed Python version.uv python find: インストールされたPythonのバージョンを見つけます。
  • uv python pin: Pin the current project to use a specific Python version.uv python pin: 現在のプロジェクトを特定のPythonバージョンに固定します。
  • uv python uninstall: Uninstall a Python version.uv python uninstall: Pythonのバージョンをアンインストールします。

See the guide on installing Python to get started.Pythonのインストールに関するガイドを参照して始めましょう。

Scriptsスクリプト

Executing standalone Python scripts, e.g., example.py.スタンドアロンのPythonスクリプトを実行します。例: example.py

  • uv run: Run a script.uv run: スクリプトを実行します。
  • uv add --script: Add a dependency to a script.uv add --script: スクリプトに依存関係を追加します。
  • uv remove --script: Remove a dependency from a script.uv remove --script: スクリプトから依存関係を削除します。

See the guide on running scripts to get started.スクリプトの実行に関するガイドを参照して始めましょう。

Projectsプロジェクト

Creating and working on Python projects, i.e., with a pyproject.toml.Pythonプロジェクトの作成と作業、つまり、pyproject.tomlを使用します。

  • uv init: Create a new Python project.uv init: 新しいPythonプロジェクトを作成します。
  • uv add: Add a dependency to the project.uv add: プロジェクトに依存関係を追加します。
  • uv remove: Remove a dependency from the project.uv remove: プロジェクトから依存関係を削除します。
  • uv sync: Sync the project's dependencies with the environment.uv sync: プロジェクトの依存関係を環境と同期します。
  • uv lock: Create a lockfile for the project's dependencies.uv lock: プロジェクトの依存関係のロックファイルを作成します。
  • uv run: Run a command in the project environment.uv run: プロジェクト環境でコマンドを実行します。
  • uv tree: View the dependency tree for the project.uv tree: プロジェクトの依存関係ツリーを表示します。
  • uv build: Build the project into distribution archives.uv build: プロジェクトを配布アーカイブにビルドします。
  • uv publish: Publish the project to a package index.uv publish: プロジェクトをパッケージインデックスに公開します。

See the guide on projects to get started.プロジェクトに関するガイドを参照して始めましょう。

Toolsツール

Running and installing tools published to Python package indexes, e.g., ruff or black.Pythonパッケージインデックスに公開されたツールを実行およびインストールします。例: ruff または black

  • uvx / uv tool run: Run a tool in a temporary environment.uvx / uv tool run: 一時環境でツールを実行します。
  • uv tool install: Install a tool user-wide.uv tool install: ユーザー全体にツールをインストールします。
  • uv tool uninstall: Uninstall a tool.uv tool uninstall: ツールをアンインストールします。
  • uv tool list: List installed tools.uv tool list: インストールされたツールのリストを表示します。
  • uv tool update-shell: Update the shell to include tool executables.uv tool update-shell: ツールの実行可能ファイルを含むようにシェルを更新します。

See the guide on tools to get started.ツールに関するガイドを参照して始めましょう。

The pip interfacepipインターフェース

Manually managing environments and packages — intended to be used in legacy workflows or cases where the high-level commands do not provide enough control.環境とパッケージを手動で管理する — レガシーなワークフローや高レベルのコマンドが十分な制御を提供しない場合に使用されることを意図しています。

Creating virtual environments (replacing venv and virtualenv):仮想環境の作成(venvおよびvirtualenvの置き換え):

  • uv venv: Create a new virtual environment.uv venv: 新しい仮想環境を作成します。

See the documentation on using environments for details.環境の使用に関するドキュメントを参照してください。

Managing packages in an environment (replacing pip and pipdeptree):環境内のパッケージの管理(pipおよびpipdeptreeの置き換え):

  • uv pip install: Install packages into the current environment.uv pip install: 現在の環境にパッケージをインストールします。
  • uv pip show: Show details about an installed package.uv pip show: インストールされたパッケージの詳細を表示します。
  • uv pip freeze: List installed packages and their versions.uv pip freeze: インストールされたパッケージとそのバージョンをリストします。
  • uv pip check: Check that the current environment has compatible packages.uv pip check: 現在の環境に互換性のあるパッケージがあるか確認します。
  • uv pip list: List installed packages.uv pip list: インストールされたパッケージの一覧。
  • uv pip uninstall: Uninstall packages.uv pip uninstall: パッケージをアンインストールします。
  • uv pip tree: View the dependency tree for the environment.uv pip tree: 環境の依存関係ツリーを表示します。

See the documentation on managing packages for details.パッケージの管理に関する詳細は、ドキュメントを参照してください。

Locking packages in an environment (replacing pip-tools):環境内のパッケージをロックする(pip-toolsの置き換え):

  • uv pip compile: Compile requirements into a lockfile.uv pip compile: 要件をロックファイルにコンパイルします。
  • uv pip sync: Sync an environment with a lockfile.uv pip sync: ロックファイルと環境を同期します。

See the documentation on locking environments for details.環境のロックに関する詳細は、ドキュメントを参照してください。

Important重要

These commands do not exactly implement the interfaces and behavior of the tools they are based on. The further you stray from common workflows, the more likely you are to encounter differences. Consult the pip-compatibility guide for details.これらのコマンドは、基にしているツールのインターフェースや動作を正確に実装しているわけではありません。一般的なワークフローから逸脱すればするほど、違いに遭遇する可能性が高くなります。詳細については、pip-compatibility guideを参照してください。

Utilityユーティリティ

Managing and inspecting uv's state, such as the cache, storage directories, or performing a self-update:uvの状態を管理および検査すること、例えばキャッシュ、ストレージディレクトリ、または自己更新を行うこと:

  • uv cache clean: Remove cache entries.uv cache clean: キャッシュエントリを削除します。
  • uv cache prune: Remove outdated cache entries.uv cache prune: 古いキャッシュエントリを削除します。
  • uv cache dir: Show the uv cache directory path.uv cache dir: uvキャッシュディレクトリのパスを表示します。
  • uv tool dir: Show the uv tool directory path.uv tool dir: uvツールディレクトリのパスを表示します。
  • uv python dir: Show the uv installed Python versions path.uv python dir: uvにインストールされたPythonバージョンのパスを表示します。
  • uv self update: Update uv to the latest version.uv self update: uvを最新バージョンに更新します。

Next steps次のステップ

Read the guides for an introduction to each feature, check out the concept pages for in-depth details about uv's features, or learn how to get help if you run into any problems.ガイドを読んで各機能の紹介を確認し、uvの機能に関する詳細はコンセプトページをチェックするか、問題が発生した場合はヘルプを取得する方法を学んでください。