15

I have completely uninstalled and re installed poetry using:

POETRY_UNINSTALL=1 bash -c 'curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python'

then I re installed it using:

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -

but it did not fix the issue. and then I # for poetry config

export PATH="$HOME/.poetry/bin:$PATH"
2
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – targhs
    Commented Nov 15, 2021 at 5:49
  • export PATH=$HOME/.local/bin:$PATH solved it for me. That said, don't use Poetry: youtube.com/watch?v=Gr9o8MW_pb0 Commented Apr 30 at 8:41

5 Answers 5

11

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
2
  • That's a good one! I was having this issue and by running the last command to uninstall, it actually fixed it. I didn't need to reinstall, but it's now working
    – mazulo
    Commented Oct 27, 2022 at 12:15
  • 1
    get-poetry.sh was deprecated for some time and doesn't exist anymore under the link provided here
    – niid
    Commented Feb 24, 2023 at 21:36
6

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!

6

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.

3

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

1
  • 1
    this was the only working solution for me Commented Jul 19, 2023 at 14:17
-2

poetry self update 1.0.10 then poetry install.

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

2
  • I need to install poetry using curl because I am using bash. python-poetry.org/docs/#installation
    – Shelly
    Commented Nov 12, 2021 at 23:54
  • 14
    when I attempted the above I got no module name cleo again.
    – Shelly
    Commented Nov 12, 2021 at 23:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.