2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

mise-en-placeとuvでPython環境をセットアップする

Posted at

これまでpyenvvenvdirenvでPython環境を用意していたのだが、mise-en-placeuvに乗り換えることにした。

そこで、プロジェクトで使用するPythonバージョンを指定し、仮想環境をセットアップする方法を記しておく。

# 使用するPythonバージョンの指定
mise use python@3.12

# 仮想環境の作成
uv venv

# venvディレクトリの登録
cat << EOF >> .mise.toml

[env]
_.python.venv = ".venv"
EOF

# 手動で更新した.mise.tomlの有効化
mise trust
2
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?