23

Using Poetry, I want to find all versions of an specific package that are available for install. Is it possible to achieve that?

(Similar to Python and pip, list all versions of a package that's available?)

Fábio Perez
  • 23,850
  • 22
  • 76
  • 100
  • Why do you want to use poetry for this task? – finswimmer Jun 03 '21 at 18:09
  • 3
    @finswimmer The version I'm current using for a specific package cannot be installed with Poetry. I want to see all versions available to see if I have an alternative version I could use. – Fábio Perez Jun 09 '21 at 19:46
  • 1
    poetry can break on some versions. e.g I cannot run `poetry add notebook` on MacOS Big Sur and curious about alternative versions available. – Daniil Iaitskov Aug 10 '21 at 02:12

2 Answers2

14

It won't show all versions available, but if you want to see the latest version of a given package available for install using Poetry, you can use a combination of the @latest version qualifier and --dry-run option of poetry add, as follows:

poetry add <package>@latest --dry-run

This will output the version of the package (and dependent packages) available, but will not execute anything.

elukem
  • 1,068
  • 10
  • 11
11

To display the current and the latest version of the packages installed in your virtual env, just run the command:

poetry show --latest

But the show-command has special param for checking the outdated packages only:

poetry show --outdated
Sergio
  • 119
  • 1
  • 3