[Python Dependency Pitfalls] A total mess?

Hey there,

Recently I watched a Pythonista ask for advice on setting up a Python project on his work machine.

This new developer had some prior experience with NodeJS and had just started to get his feet wet with Python.

But OH BOY was he already frustrated:

"Why is Python dependency management so sh*t?"

He was trying to install someone else's Python application and to get it to run on his work machine.

The app had some external dependencies it needed to work properly—things like a third-party networking library and a database interface.

But the way the original author "documented" these dependencies was utterly lacking:

There was only a small "README" file with a list of packages the project needs to work.

That's where the trouble started—

This list was a) incomplete and b) lacked any versioning information whatsoever.

So our poor Pythonista is trying hard to make this application work.

But every time he installs another package dependency and then tries to launch the app he gets slammed in the face with this:

"ImportError: No module named X"

He then spends 15 minutes googling for a solution, finally hunts down and installs the missing package, runs the app again and:

"ImportError: No module named Y"

Yuck!

(Rinse and repeat.)

He's spinning his wheels, and the lack of progress is starting to get to him.

After all, what he loves about programming is "programming"—and NOT wasting hours on trial and error just getting ready for some real development work.

So the guy becomes (understandably) more and more irritated.

Finally, he vents his frustration by putting the blame on Python:

"In NodeJS it's fairly basic to have all dependencies listed in package.json and everything gets installed automatically with a simple command…"

"Why isn't there such a thing for Python? Python packaging is A TOTAL MESS."

And who would disagree with him after going through the same experience?

Modern dependency management and dealing with third-party packages in Python is complex.

And it's easy to get stuck or to "shoot yourself in the foot" if you don't feel confident in the central workflows and tools.

Over the next 5 days, I'll show you some of the main pitfalls with dependency management in Python—and how to avoid them.

When you steer clear of these potholes, you'll find that you can make progress more easily…

And you'll pull ahead of your peers who are left wondering why their productivity continues to plateau.

We'll kick off the first lesson tomorrow.

— Dan Bader

P.S. Ironically, pitfall #1 is something that recently shook the NodeJS community to its core.

It was a "clustermug" so bad that even some newspapers reported about it. But unfortunately Python isn't immune against this problem either…

You'll hear the details in my next email.

Key phrases

Older messages

New Python tutorials on Real Python

Saturday, September 24, 2022

Hey there, There's always something going on over at realpython.com as far as Python tutorials go. Here's what you may have missed this past week: When Do You Use an "..." Ellipsis in

[PythonistaCafe] Q&A

Sunday, September 18, 2022

Hey there, At this point you should have a pretty good idea of what PythonistaCafe is about and what makes it special. In this email I want to answer some common questions that I get asked about the

[Python Mastery] What Pythonistas can learn from bestselling authors

Sunday, September 18, 2022

Hey there, I just finished reading Stephen King's "On Writing." It's a great little book where he shares some of the writing advice and stories he's picked up over the course of

[Python Mastery] The hidden costs of "copy-paste" Python programming

Saturday, September 17, 2022

Hey there, Here's a development story that plays out thousands of times each day: Avid Pythonista Max is working on a function to find the 10 oldest files in a nested directory hierarchy. He needs

[Python Dependency Pitfalls] The Iceberg

Saturday, September 17, 2022

Hey there, The other day I read this quote from a Python developer that made me stop and think: "As a noob with a little programming knowledge already, I've found setting up and installing

Digest #89: Pipeline as Code 🔥

Monday, February 6, 2023

Digest #89: Pipeline as Code 🔥 #89: Pipeline as Code This week, I have a lot of exciting topics for you. To start off, we cover the basics of effective dashboard design and how you can create a Grafana

Max Q - Space raise

Monday, February 6, 2023

TechCrunch Newsletter TechCrunch logo Max Q logo By Aria Alamalhodaei Monday, February 06, 2023 Hello and welcome back to Max Q! In this issue: Voyager Space's new funding Orbital Sidekick's

JSK Daily for Feb 6, 2023

Monday, February 6, 2023

JSK Daily for Feb 6, 2023 View this email in your browser A community curated daily e-mail of JavaScript news Maximize Your React Skills: Build a To-Do List App from Start to Finish (with TypeScript +

Get free scholarship to INDUSTRY: The Product Conference

Monday, February 6, 2023

Sometimes, the people who would benefit most from attending conferences may not be in the room — and we want to help change that for the upcoming European edition (March 20-22, 2023) and Global edition

Daily Coding Problem: Problem #1015 [Hard]

Monday, February 6, 2023

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Google. In a directed graph, each node is assigned an uppercase letter. We define a

The Smarter A.I. Powered No-Code Platform

Monday, February 6, 2023

Blaze.tech is the fast growing AI powered no-code platform that's revolutionizing the way teams build web apps and tools. Blaze enables its customers to build and launch apps in minutes,

Visualized | Most Grammy-Winning Artists of All-Time + Music Consumption in 2022 🎤

Monday, February 6, 2023

After last night's Grammy Awards, we look at which artist has won the most all-time, along with global music consumption habits in general. View Online | Subscribe Presented by: Food Security is a

Wi-Fi 6E: What Is It, and How Is It Different From Wi-Fi 6?

Monday, February 6, 2023

Did You Know?: The sound of a whip cracking is a mini sonic boom. The loop traveling along the length of the whip continues to gain speed until it reaches the speed of sound and breaks the sound

Tech for a sustainable future: The challenges and opportunities ahead

Monday, February 6, 2023

Now could be a great time to trade in your smartphone: Here's why... ZDNET ZDNET Insights February 6, 2023 placeholder Tech for a sustainable future: The challenges and opportunities ahead We need

Leveraging AI across your business, new approaches to customer acquisition and more this week at TechCrunch | February 6

Monday, February 6, 2023

Disrupt 2-for-1 pre-sale, audience choice voting and more... This week we have a couple of online events starting on Wednesday with TechCrunch Live when Cube's CEO and founder, Christina Ross, will