😺

windowsでpoetryを使い始める

2024/12/14に公開

概要

scoop->pipx->poetry

scoop install

https://scoop.sh/

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression

pipx

https://github.com/pypa/pipx?tab=readme-ov-file#on-windows

scoop install pipx
pipx ensurepath

poetry setup

プロジェクトルートにvenvフォルダを作成するように変更する

poetry config virtualenvs.in-project true

おまけ

pytorch install

cu118の場合

poetry source add torch_cu118 --priority=explicit https://download.pytorch.org/whl/cu118
poetry add torch torchvision torchaudio --source torch_cu118 --no-cache

--nocache はこのissueの事象でつけている。
https://github.com/python-poetry/poetry/issues/6409#issuecomment-2376084163

Discussion