Poetry installation fails on Ubuntu

I am trying to install poetry the recommended way on Ubuntu 20.04.3 LTS:

curl -sSL | python -

When I do so, it says:

 | python -
Command 'python' not found, did you mean: command 'python3' from deb python3 command 'python' from deb python-is-python3
curl: (23) Failed writing body (485 != 1378)

Then I try python3

curl -sSL | python3 -

The installation succeeds.

Afterwards when calling poetry --version to test the installation, I get:

poetry: command not found

Although I added poetry to PATH manually, in .bash_profile:

PATH=$PATH:~/poetry/bin

I also tried adding poetry to path in .bashrc similarly to this answer:

export PATH="~/poetry/bin:$PATH"
3

1 Answer

You add ~/poetry/bin to PATH, but it should be ~/.poetry/bin.


Regarding python is not available, you can (re)install python-is-python3 package via apt:

sudo apt install python-is-python3
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like