[Solved]-I am getting no module name cleo when trying to do "poetry add"

6👍

You just need to re-install poetry

# install
curl -sSL https://install.python-poetry.org | python3 -
# update
poetry self update
# uninstall
curl -sSL https://install.python-poetry.org | python3 - --uninstall

5👍

This command fixed it for me (OSX):

rm -rf ~/.poetry

I think it gets your local files in a muddle!

Be careful running this in your user folder!

2👍

To add to this, I am using zsh on WSL and I had to:

Uninstall poetry

curl -sSL https://install.python-poetry.org | python3 - --uninstall

Remove poetry executables (I used which poetry to find these)

rm /home/<username>/.local/bin/poetry

sudo rm /usr/bin/poetry

Reinstall poetry

curl -sSL https://install.python-poetry.org | python3 -

Export PATH to shell config

# Open .zshrc
nano ~/.zshrc
# Add 'export PATH="/home/tristannew/.local/bin:$PATH"' to file
# Reload zsh
source ~/.zshrc

Finally, check poetry version

poetry --version

This worked for me so I am posting it here in case the other people require the same solution.

👤trizzo

0👍

I needed a combination of the existing answers to get it working

# uninstall poetry
curl -sSL https://install.python-poetry.org | python3 - --uninstall

# remove the existing poetry cache(?) from your home directory
rm -rf /home/<username>/.poetry

# reinstall poetry
curl -sSL https://install.python-poetry.org | python3 -

See this Github issue for more info

-2👍

poetry self update 1.0.10 then poetry install.

As mentioned here. Two separate errors, both caused by poetry version.

Leave a comment