Python を mise でインストールし、uv の venv で仮装環境を管理する
asdf と似たバージョンマネージャに mise があります。 about には mise の特徴として 3 点、挙げられています。
Its functionality is grouped into 3 categories described below.
mise installs and manages dev tools/runtimes like node, python, or terraform both simplifying installing these tools and allowing you to specify which version of these tools to use in different projects. mise supports hundreds of dev tools.
mise manages environment variables letting you specify configuration like AWS_ACCESS_KEY_ID that may differ between projects. It can also be used to automatically activate a Python virtualenv when entering projects too.
mise is a task runner that can be used to share common tasks within a project among developers and make things like running tasks on file changes easy.
今回は mise を使って Python をインストールし、更に mise と uv を連携させ、uv で作成した venv 環境を利用する手順をメモしておきます。 尚、公式サイトには mise と Python を組み合わせて利用する際の設定例が記載された Mise + Python Cookbook というページもあります。