Search code examples
python-poetry

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


The old project was build by Conda and I need to migrate it to using poetry.

One can use Poetry Init command to set up the toml configuration file. sphinx library was listed in the old Conda enviroment.yml file. And I need to add it by using poetry

In the step of adding packages, when I search sphinx there is only 9 candidates, in fact there are always 9 candidates. And there is no sphinx listed (see below) but when I put the name my self as it mentioned ,or the complete package name if it is not listed, I got the Value "sphinx" is invalid error

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
 >

And poetry add sphinx command is not working as well and gives me the SolverProblemError message

And idea how to solve this?


Solution

  • At the moment the poetry is written by python 3.7 but I am using python 3.9. When using the python 3.7 all issues were off