[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

[PythonistaCafe] What makes PythonistaCafe different

Saturday, June 25, 2022

Hey there, Mastering Python is *not* just about getting the books and courses to study—to be successful you also need a way to stay motivated and to grow your abilities in the long run. Many

[Python Dependency Pitfalls] The Iceberg

Saturday, June 25, 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

[Python Dependency Pitfalls] "Re-inventing the wheel" disease

Friday, June 24, 2022

Hey there, PyPI, the Python packaging repository, now contains more than 100000 third-party packages in total. That's an *overwhelming* number of packages to choose from... And this feeling of

[Python Mastery] What Pythonistas can learn from bestselling authors

Friday, June 24, 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

Thursday, June 23, 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

Tuesday Triage #108

Tuesday, August 9, 2022

Your weekly crème de la crème of the Internet is here! The 108th edition featuring gesti famosi, Ejection Tie club, and a French focaccia. ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

I replaced all our blog thumbnails using DALL·E 2 — and An incident impacting 5M accounts and private information on Twitter

Tuesday, August 9, 2022

Issue #854 — Top 20 stories of August 10, 2022 Issue #854 — August 10, 2022 You receive this email because you are subscribed to Hacker News Digest. You can open it in the browser if you prefer. 1 I

WhatsApp extends its unsend time limit to 'a little over two days'

Tuesday, August 9, 2022

TechCrunch Newsletter TechCrunch logo The Daily Crunch logo By Christine Hall and Haje Jan Kamps Tuesday, August 09, 2022 Whazzaaaaaaa, we're back with another round of newsy goodness on this fine

Finding & Fixing Python Bugs, Uncommon Usage, NBA Highlights, and More

Tuesday, August 9, 2022

Finding and Fixing Python Code Bugs #537 – AUGUST 9, 2022 VIEW IN BROWSER The PyCoder's Weekly Logo Finding and Fixing Python Code Bugs Learn how to identify and fix logic errors, or bugs, in your

Data Elixir - Issue 399

Tuesday, August 9, 2022

The 8 slide resume. Intro to streaming for data scientists. Random Forest explainer. ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

[New post] Rockin’ The Code World with dotNetDave – Special Guest: Magnus Mårtensson

Tuesday, August 9, 2022

dotNetDave posted: "Join me live on Saturday, August 20th, 2022 at 10:00 PST on C# Corner for show #64 where I will, for the second time, interview my good friend from Sweden, Magnus Mårtensson,

Infographic | Visualizing 10 Years of Global EV Sales by Country 🔋

Tuesday, August 9, 2022

Global EV sales have grown exponentially, more than doubling in 2021 to 6.8 million units. Here's a look at EV sales by country since 2011. View Online | Subscribe Presented by: NEO: NETZ | OTCQB:

[Sublime + Python Setup] Grumpy old greybeard with a whitespace problem

Tuesday, August 9, 2022

One fateful day, the Agile Gods that be decided to “add some firepower” to my little team… And so, developer Paul joined (name changed to protect the guilty). Before I dive into this story, let me ask

New Webinar! IdEM Broadband Macromodeling Tool for Electronic Device Characterization

Tuesday, August 9, 2022

Replace expensive physical tests with high accuracy simulation View this email in your browser engineering.com Electronic Device Characterization using IdEM Broadband Macromodeling Tool Live Webinar -

3 ways to optimize SaaS sales in a downturn

Tuesday, August 9, 2022

TechCrunch+ Newsletter TechCrunch+ logo TechCrunch+ Roundup logo By Walter Thompson Tuesday, August 09, 2022 Welcome to TechCrunch+ Tuesday Image Credits: Eva Almqvist / Getty Images I have limited