2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

uv チートシート

Last updated at Posted at 2025-10-08

自分がよく使うコマンド(+@)のみを抜粋

1. 新規プロジェクトの場合

初期化・実行

uv init
uv run main.py

Pythonバージョンの固定

uv python pin 3.12

ライブラリの追加・削除

uv add pandas
uv remove pandas

Jupyter Notebookの追加(開発環境のみ)

uv add --dev ipykernel

Jupyter Notebookの追加(本番環境)

uv add ipykernel

requirements.txtの作成

uv pip freeze

2. 既存プロジェクトの場合

requirements.txtのライブラリを追加

uv add -r requirements.txt

依存関係ツリーの表示

uv tree

3. その他

キャッシュの削除

uv cache clean

streamlitの実行

uv run streamlit run app.py

0. インストール

Windows

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

Mac, Linux

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

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?