Skip to content

Installing uvuvのインストール

Installation methodsインストール方法

Install uv with our standalone installers or your package manager of choice.独立したインストーラーまたはお好みのパッケージマネージャーを使用してuvをインストールします。

Standalone installerスタンドアロンインストーラー

uv provides a standalone installer to download and install uv:uvをダウンロードしてインストールするためのスタンドアロンインストーラーを提供しています:

Use curl to download the script and execute it with sh:curlを使用してスクリプトをダウンロードし、shで実行します:

$ curl -LsSf https://astral.sh/uv/install.sh | sh

If your system doesn't have curl, you can use wget:システムに curl がない場合は、 wget を使用できます:

$ wget -qO- https://astral.sh/uv/install.sh | sh

Request a specific version by including it in the URL:URLに特定のバージョンを含めてリクエストします:

$ curl -LsSf https://astral.sh/uv/0.9.13/install.sh | sh

Use irm to download the script and execute it with iex:irm を使用してスクリプトをダウンロードし、 iex で実行します:

PS> powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Changing the execution policy allows running a script from the internet.実行ポリシー を変更することで、インターネットからスクリプトを実行できるようになります。

Request a specific version by including it in the URL:URLに特定のバージョンを含めてリクエストします:

PS> powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/0.9.13/install.ps1 | iex"

Tipヒント

The installation script may be inspected before use:インストールスクリプトは使用前に確認できます:

$ curl -LsSf https://astral.sh/uv/install.sh | less
PS> powershell -c "irm https://astral.sh/uv/install.ps1 | more"

Alternatively, the installer or binaries can be downloaded directly from GitHub.また、インストーラーやバイナリを GitHub から直接ダウンロードすることもできます。

See the reference documentation on the installer for details on customizing your uv installation.uvのインストールをカスタマイズする詳細については、 インストーラー のリファレンスドキュメントを参照してください。

PyPIPyPI

For convenience, uv is published to PyPI.便利なことに、uvは PyPI に公開されています。

If installing from PyPI, we recommend installing uv into an isolated environment, e.g., with pipx:PyPIからインストールする場合、pipxを使用してuvを隔離された環境にインストールすることをお勧めします。

$ pipx install uv

However, pip can also be used:ただし、pipも使用できます。

$ pip install uv

Note注意

uv ships with prebuilt distributions (wheels) for many platforms; if a wheel is not available for a given platform, uv will be built from source, which requires a Rust toolchain. See the contributing setup guide for details on building uv from source.uvは多くのプラットフォーム向けに事前ビルドされたディストリビューション(ホイール)を提供しています。特定のプラットフォームにホイールが利用できない場合、uvはソースからビルドされますが、これにはRustツールチェーンが必要です。ソースからuvをビルドする詳細については、貢献のセットアップガイドを参照してください。

HomebrewHomebrew

uv is available in the core Homebrew packages.uvはコアHomebrewパッケージで利用可能です。

$ brew install uv

MacPortsMacPorts

uv is available via MacPorts.uvはMacPortsを通じて利用可能です。

$ sudo port install uv

WinGetWinGet

uv is available via WinGet.uvはWinGetを通じて利用可能です。

$ winget install --id=astral-sh.uv  -e

ScoopScoop

uv is available via Scoop.uvはScoopを介して利用可能です。

$ scoop install main/uv

DockerDocker

uv provides a Docker image at ghcr.io/astral-sh/uv.uvは以下のDockerイメージを提供しています。 ghcr.io/astral-sh/uv

See our guide on using uv in Docker for more details.詳細については、Dockerでのuvの使用に関するガイドをご覧ください。

GitHub ReleasesGitHub Releases

uv release artifacts can be downloaded directly from GitHub Releases.uvのリリースアーティファクトは、GitHub Releasesから直接ダウンロードできます。

Each release page includes binaries for all supported platforms as well as instructions for using the standalone installer via github.com instead of astral.sh.各リリースページには、すべてのサポートされているプラットフォーム用のバイナリと、astral.shの代わりにgithub.comを介してスタンドアロンインストーラーを使用するための手順が含まれています。

CargoCargo

uv is available via crates.io.uvはcrates.ioを介して利用可能です。

$ cargo install --locked uv

Note注意

This method builds uv from source, which requires a compatible Rust toolchain.この方法は、互換性のあるRustツールチェーンを必要とするソースからuvをビルドします。

Upgrading uvuvのアップグレード

When uv is installed via the standalone installer, it can update itself on-demand:uvがスタンドアロンインストーラーを介してインストールされている場合、オンデマンドで自動更新できます:

$ uv self update

Tipヒント

Updating uv will re-run the installer and can modify your shell profiles. To disable this behavior, set UV_NO_MODIFY_PATH=1.uvを更新すると、インストーラーが再実行され、シェルプロファイルが変更される可能性があります。この 動作を無効にするには、UV_NO_MODIFY_PATH=1を設定してください。

When another installation method is used, self-updates are disabled. Use the package manager's upgrade method instead. For example, with pip:別のインストール方法が使用されている場合、自動更新は無効になります。代わりにパッケージマネージャの アップグレード方法を使用してください。例えば、pipを使用する場合:

$ pip install --upgrade uv

Shell autocompletionシェルの自動補完

Tipヒント

You can run echo $SHELL to help you determine your shell.echo $SHELLを実行して、シェルを特定するのに役立てることができます。

To enable shell autocompletion for uv commands, run one of the following:uvコマンドのシェル自動補完を有効にするには、次のいずれかを実行してください:

echo 'eval "$(uv generate-shell-completion bash)"' >> ~/.bashrc
echo 'eval "$(uv generate-shell-completion zsh)"' >> ~/.zshrc
echo 'uv generate-shell-completion fish | source' > ~/.config/fish/completions/uv.fish
echo 'eval (uv generate-shell-completion elvish | slurp)' >> ~/.elvish/rc.elv
if (!(Test-Path -Path $PROFILE)) {
  New-Item -ItemType File -Path $PROFILE -Force
}
Add-Content -Path $PROFILE -Value '(& uv generate-shell-completion powershell) | Out-String | Invoke-Expression'

To enable shell autocompletion for uvx, run one of the following:uvxのシェル自動補完を有効にするには、次のいずれかを実行してください:

echo 'eval "$(uvx --generate-shell-completion bash)"' >> ~/.bashrc
echo 'eval "$(uvx --generate-shell-completion zsh)"' >> ~/.zshrc
echo 'uvx --generate-shell-completion fish | source' > ~/.config/fish/completions/uvx.fish
echo 'eval (uvx --generate-shell-completion elvish | slurp)' >> ~/.elvish/rc.elv
if (!(Test-Path -Path $PROFILE)) {
  New-Item -ItemType File -Path $PROFILE -Force
}
Add-Content -Path $PROFILE -Value '(& uvx --generate-shell-completion powershell) | Out-String | Invoke-Expression'

Then restart the shell or source the shell config file.その後、シェルを再起動するか、シェル設定ファイルをソースしてください。

Uninstallationアンインストール

If you need to remove uv from your system, follow these steps:システムからuvを削除する必要がある場合は、次の手順に従ってください。

  1. Clean up stored data (optional):保存されたデータをクリーンアップする(オプション):

    $ uv cache clean
    $ rm -r "$(uv python dir)"
    $ rm -r "$(uv tool dir)"
    

    Tipヒント

    Before removing the binaries, you may want to remove any data that uv has stored. See the storage reference for details on where uv stores data.バイナリを削除する前に、uvが保存したデータを削除したい場合があります。uvがデータを保存する場所の詳細については、 ストレージリファレンスを参照してください。

  2. Remove the uv, uvx, and uvw binaries:uv、uvx、およびuvwのバイナリを削除する:

    $ rm ~/.local/bin/uv ~/.local/bin/uvx
    
    PS> rm $HOME\.local\bin\uv.exe
    PS> rm $HOME\.local\bin\uvx.exe
    PS> rm $HOME\.local\bin\uvw.exe
    

    Note注意

    Prior to 0.5.0, uv was installed into ~/.cargo/bin. The binaries can be removed from there to uninstall. Upgrading from an older version will not automatically remove the binaries from ~/.cargo/bin.0.5.0以前では、uvは~/.cargo/binにインストールされていました。バイナリはそこから削除してアンインストールできます。古いバージョンからのアップグレードでは、~/.cargo/binからバイナリが自動的に削除されることはありません。

Next steps次のステップ

See the first steps or jump straight to the guides to start using uv.最初のステップを参照するか、直接ガイドにジャンプしてuvの使用を開始してください。