Skip to content

Instantly share code, notes, and snippets.

@josfam
Last active December 23, 2025 17:14
Show Gist options
  • Select an option

  • Save josfam/5ddb5e6190a030b35dc69290059364bb to your computer and use it in GitHub Desktop.

Select an option

Save josfam/5ddb5e6190a030b35dc69290059364bb to your computer and use it in GitHub Desktop.
How to install poetry for python on Ubuntu (and other Debian-based distros).

How to install poetry for python on Ubuntu (and other Debian-based distros).

Update the package list

sudo apt update

Install curl

  • Install curl if you don't have it already
sudo apt install -y curl

Download with curl and run the poetry installation script

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

Confirm poetry installation

poetry --version
  • This should output the version of Poetry that was installed.

Configure your shell to use poetry

  • Add Poetry to your system PATH by adding the following line to your shell configuration file (e.g., ~/.bashrc, ~/.zshrc):
export PATH="$HOME/.local/bin:$PATH"

(Poetry, by default, is installed in the ~/.local/bin directory in Unix)

Apply the changes to your current shell session

source ~/.bashrc
  • (or source ~/.zshrc if you are using zsh)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment