Skip to content

Fixing "No preset version installed for command poetry"

Erica Pisani
Erica Pisani
1 min read

Poetry is a packaging and dependency management tool for Python, and a tool that didn't exist when I worked with Python many years before I started working at Float. I also hadn't been exposed to asdf, which is a handy little tool for managing multiple runtimes.

One error that I've encountered a couple of times since I started is the No preset version installed for command poetry one. It looks something like this:

poetry install --sync
No preset version installed for command poetry
Please install a version by running one of the following:

asdf install python 3.12.5

or add one of the following versions in your config file at <some-path>/.tool-versions
python 3.11.10
python 3.11.9

This has tended to happen when I switch between projects, and it's because while I may have installed Poetry for a specific version of Python in one project, I didn't have it installed for the project that I changed to working on.

The solution: Run pip install poetry in that project, and then re-run your poetry install command.

Things should work as expected going forward.

tips-and-trickspython

Comments


Related Posts

Members Public

Git Log's Hidden Gems: Using -S and -L for Powerful Code History Search

Ever needed to track down when a specific piece of code was first introduced in a project? As part of some refactoring I had to do recently, I needed to do just that for a variable on a Django model. I was already familiar with the basic git log command,

Git Log's Hidden Gems: Using -S and -L for Powerful Code History Search
Members Public

Using XOR to write concise conditionals

It's not uncommon that I sometimes write if statements where the overall conditional is true when both conditions are true or both are false. As an example, let's say I'm validating input from an API call where I'm updating information on a

Members Public

Learning in public, preparing for conferences, and learning about the world of global payments