[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.

Older messages

[Python Dependency Pitfalls] How to set the world on fire

Friday, July 16, 2021

Hey there, #1 on my list of dependency management pitfalls is there for a good reason: It lead to a single developer causing mayhem and breaking thousands of open-source projects around the world in

[Sublime + Python Setup] Sublime Text is just a blank canvas…

Friday, July 16, 2021

Hey there, When I became serious about optimizing Sublime Text with plugins, it was hard for me to separate the wheat from the chaff. Without a real guideline or roadmap I resorted to installing *any*

[PythonistaCafe] What's in PythonistaCafe for you?

Friday, July 16, 2021

Hey there, A couple of years ago I'd become quite interested in martial arts. Hours upon hours of watching "The Karate Kid" growing up must've taken their toll on me... And so, I

[Sublime + Python Setup] How to become a happier & more productive Python dev

Friday, July 16, 2021

Hey there, I really struggled with setting up an effective development environment as a new Python developer. It was difficult to build the right habits and to find a set of tools I enjoyed to use.

[Sublime + Python Setup] The Ctrl+s "Heisenbug"

Friday, July 16, 2021

"What the **** is going on?!" I heard Keith yell. Returning from my lunch break and in a helpful mood I grabbed my coffee mug and shuffled over to my coworker's desk. "What's

You Might Also Like

Apple RCS 📱, SBF's 25 year sentence 👮, Linux Foundation's Redis fork 👨‍💻

Friday, March 29, 2024

RCS is coming to the iPhone in the fall of 2024 Sign Up|Advertise|View Online TLDR Together With Veracode TLDR 2024-03-29 Build fast, build secure (Sponsor) Software is drowning in security debt.

Data Science Weekly - Issue 540

Friday, March 29, 2024

Curated news, articles and jobs related to Data Science, AI, & Machine Learning ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

This Week in Rust #540

Friday, March 29, 2024

Email isn't displaying correctly? Read this e-mail on the Web This Week in Rust issue 540 — 27 MAR 2024 Hello and welcome to another issue of This Week in Rust! Rust is a programming language

The Value Of A Promise 🤞

Friday, March 29, 2024

How much is a promise from a tech company really worth, anyway? Here's a version for your browser. Hunting for the end of the long tail • March 28, 2024 The Value Of A Promise When you hear a

New Elastic Security for SIEM Training Course

Friday, March 29, 2024

Detect and respond to evolving threats ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ elastic | Search. Observe. Protect Detect anomalies and malicious behavior March

SBF gets 25 years 

Thursday, March 28, 2024

Sam Bankman-Fried is sentenced View this email online in your browser By Christine Hall Thursday, March 28, 2024 Welcome back to TechCrunch PM! The editorial team spent a chunk of the day discussing

💎 Issue 410 - Being laid off in 2023-2024 as an early-career developer

Thursday, March 28, 2024

This week's Awesome Ruby Newsletter Read this email on the Web The Awesome Ruby Newsletter Issue » 410 Release Date Mar 28, 2024 Your weekly report of the most popular Ruby news, articles and

💻 Issue 403 - Microsoft defends .NET 9 features competing with open source ecosystem

Thursday, March 28, 2024

This week's Awesome .NET Weekly Read this email on the Web The Awesome .NET Weekly Issue » 403 Release Date Mar 28, 2024 Your weekly report of the most popular .NET news, articles and projects

💻 Issue 410 - Node.js TSC Confirms: No Intention to Remove npm from Distribution

Thursday, March 28, 2024

This week's Awesome Node.js Weekly Read this email on the Web The Awesome Node.js Weekly Issue » 410 Release Date Mar 28, 2024 Your weekly report of the most popular Node.js news, articles and

💻 Issue 410 - JSDoc as an alternative TypeScript syntax

Thursday, March 28, 2024

This week's Awesome JavaScript Weekly Read this email on the Web The Awesome JavaScript Weekly Issue » 410 Release Date Mar 28, 2024 Your weekly report of the most popular JavaScript news, articles