【问题标题】:ModuleNotFoundError: No module named 'poetry.console' when trying to uninstall poetryModuleNotFoundError:尝试卸载诗歌时没有名为“poetry.console”的模块
【发布时间】:2022-01-07 12:51:49
【问题描述】:

首先我运行了poetry update,这似乎有效。为了验证它是否真的更新了我的诗歌版本,我运行了poetry --version,这导致了以下错误:

Traceback (most recent call last):
File "C:\Users\XXX\.poetry\bin\poetry", line 17, in <module>
from poetry.console import main
ModuleNotFoundError: No module named 'poetry.console'

要解决此错误,卸载诗歌似乎是最佳选择。所以我尝试卸载python get-poetry.py --uninstallpython install-poetry.py --uninstall 的诗歌。两者都导致[Errno 2] No such file or directory。此外,我尝试了poetry --uninstall,这也导致了ModuleNotFoundError

如何卸载诗歌以及​​为什么我的命令不起作用?

【问题讨论】:

    标签: python uninstallation python-poetry modulenotfounderror nosuchfile


    【解决方案1】:

    get-poetry.pyinstall-poetry.py 是安装程序脚本,必须先下载。您可以将下载和运行结合在一行中,例如:

    curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - --uninstall
    

    curl -sSL https://install.python-poetry.org | python3 - --uninstall
    

    用于卸载诗歌。对于卸载,您必须使用与安装相同的脚本。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-10-18
      • 1970-01-01
      • 1970-01-01
      • 2019-02-23
      • 1970-01-01
      • 2019-02-25
      • 2019-03-28
      相关资源
      最近更新 更多