How to install Poetry in MacOS

Emad Dehnavi
2 min readMar 30, 2024

Poetry is a tool for dependency management and packaging in Python. While there are many ways to install Poetry in your mac and you can find them in the Getting started section in their official website, I’m gonna share the way I manage to install it with details including some steps and troubles I faced which was not mentioned in the official website, so this might help some fellow developers :)

Poetry — Python Packaging Management

I installed Poetry through pipx which used for installing and running Python applications in isolated environments. if you already have it, you can skip this few lines and go to Install Poetry using pipx section, but if you don’t, you can install it through brew

brew install pipx

Tip: if you don’t have the Xcode Command Line Tools yet installed, you will get an error while installing pipx through brew. You can install the Command Line Tools by running xcode-select — install

Once installed, you need to run the following to update your PATH environment variable.

pipx ensurepath

Install Poetry using pipx

Alright, now let’s install poetry by running:

pipx install poetry

Once it’s installed, if you run any poetry command, depends on which command-line interpreter you are using, you…

--

--

Emad Dehnavi
Emad Dehnavi

Written by Emad Dehnavi

With 8 years as a software engineer, I write about AI and technology in a simple way. My goal is to make these topics easy and interesting for everyone.