在python-poetry中找不到包,最多列出9个

Cannot find the package in python-poetry and it listed 9 at most

旧项目是 Conda 构建的,我需要将其迁移到使用诗歌。

可以使用Poetry Init命令设置toml配置文件。 sphinx 库列在旧的 Conda enviroment.yml 文件中。我需要使用 poetry

添加它

在添加包的步骤中,我搜索sphinx时只有9个候选项,实际上总是有9个候选项。并且没有列出 sphinx(见下文)但是当我把我自己的名字放在上面时, 或完整的包名称,如果它没有列出 ,我得到 值“sphinx”无效错误

Enter package # to add, or the complete package name if it is not listed:
 [0] sphinx-pyreverse
 [1] sphinx-charts
 [2] sphinx-javalink
 [3] sphinx-automodapi
 [4] sphinx-hoverxref
 [5] sphinx-runner
 [6] sphinx-jsondomain
 [7] pytest-sphinx
 [8] sphinx-tagtoctree
 [9] sphinx-patchqueue
 >

并且 poetry add sphinx 命令无法正常工作,并给我 SolverProblemError 消息

如何解决这个问题?

目前这首诗是python 3.7写的,但我用的是python 3.9。使用 python 3.7 时,所有问题都已解决