Python Poetry — The Best Data Science Dependency Management Tool?

Poetry makes deploying machine learning applications a breeze — learn how!

Photo by Prachi Gautam on Unsplash

If I had a dollar every time I faced a missing Python dependency or a version mismatch, well, I wouldn’t be a millionaire, but you get the point.

Dependency management is a common problem in data science with many potential solutions. A virtual environment is always recommended, but that’s only the beginning. It’s usually followed by keeping track of installed packages. But what about their dependencies? And dependencies of their dependencies? It’s a recursive nightmare.

Poetry might be the solution you’re looking for. It aims to be a one-stop-shop for everything dependency management related, and can even be used for publishing Python packages.

Today, you’ll build a simple machine learning application locally and then push it to a remote compute instance. If Poetry keeps up to its promise, the remote setup should be as simple as running a single shell command.

How to Get Started with Poetry

A small inconvenience with Poetry is that you can’t start with a pip install command. It needs an additional command line tool.

Install Poetry