【问题标题】:Creating new poetry environment broken (ImportError: cannot import name 'main' from 'poetry.console')创建新的诗歌环境损坏(ImportError: cannot import name \'main\' from \'poetry.console\')
【发布时间】:2022-10-23 17:39:58
【问题描述】:

我想为我的诗歌项目创建一个新的诗歌环境,因为我删除了我拥有的那个:

但我有以下错误:

这是命令输出:

Traceback (most recent call last):
  File "C:\Users\lhott\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\lhott\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\lhott\AppData\Roaming\Python\Scripts\poetry.exe\__main__.py", line 4, in <module>
ImportError: cannot import name 'main' from 'poetry.console' (C:\Users\lhott\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\console\__init__.py)

【问题讨论】:

    标签: python virtualenv python-poetry


    【解决方案1】:

    Uninstalling poetry 并重新安装它:

    (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
    

    解决了这个问题。

    【讨论】:

      猜你喜欢
      • 2019-07-20
      • 2020-07-16
      • 2019-06-10
      • 2014-09-25
      • 2014-01-02
      • 1970-01-01
      • 1970-01-01
      • 2020-05-29
      • 2018-11-13
      相关资源
      最近更新 更多