诗歌删除无法删除任何包?

Poetry remove fails to remove any packages?

诗歌安装:

(installs dependencies)
poetry show --tree

black 20.8b1 The uncompromising code formatter.
├── appdirs *
├── click >=7.1.2
├── mypy-extensions >=0.4.3
├── pathspec >=0.6,<1
├── regex >=2020.1.8
├── toml >=0.10.1
├── typed-ast >=1.4.0
└── typing-extensions >=3.7.4

接下来,诗词删除...

poetry remove black


  ValueError

  Package black not found

  at ~/proj/venv/lib/python3.9/site-packages/poetry/console/commands/remove.py:52 in handle
      48│                     requirements[key] = poetry_content[section][key]
      49│                     break
      50│
      51│             if not found:
    → 52│                 raise ValueError("Package {} not found".format(name))
      53│
      54│         for key in requirements:
      55│             del poetry_content[section][key]
      56│

这似乎应该有效,并且缺少关于该主题的搜索线程对我来说表明,应该“有效”的东西正在失败。

有什么想法吗?难道是Mac、诗歌、依赖...?

python3 v3.9,在安装了 brew 的虚拟环境中 python。

但是,错误在 python:3.9-buster 图像上重复出现。

如果 black 被指定为 pyproject.toml 中的开发依赖项(很可能因为它是代码格式化程序),--dev(或简称 -D)选项应与 poetry remove 一起使用,即:

poetry remove --dev black