LoginSignup
1
0

[Python / windows / powershell] poetryをアンインストールする

Last updated at Posted at 2022-09-22

概要

Linuxの記事はいっぱいあるけど、Windows上のpoetryをuninstallしよう、という記事はなかなか見つからなかったので、記事を作成しておいた。

アンインストールする前に

poetryの環境(env)を削除しておこう。
いらない環境を取っておいても仕方ないからね。

pyproject.tomlのあるディレクトリ内で次のコマンドを打つと、今残っている環境が一覧表示される。

poetry env list

もし残っていたら削除しておこう。
以下のコマンドも、pyproject.tomlのあるディレクトリで実行しよう。

poetry env remove

# もしくは
poetry env remove <作成されている環境名>

アンインストール開始

以下のコマンドを実行すると、

(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python - --uninstall

次のような結果が返ってきて、poetryコマンドが実行できなくなっていた。

(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python - --uninstal
# We are sorry to see you go!

This will uninstall Poetry.

It will remove the `poetry` command from Poetry's bin directory, located at:

%USERPROFILE%\.poetry\bin

This will also remove Poetry from your system's PATH.

参考にした記事

1
0
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
1
0