[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

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

Tuesday, April 5, 2022

"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

[PythonistaCafe] Q&A

Monday, April 4, 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

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

Monday, April 4, 2022

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.

[PythonistaCafe] What's in PythonistaCafe for you?

Sunday, April 3, 2022

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

[PythonistaCafe] Why PythonistaCafe exists

Saturday, April 2, 2022

Hey there, In one of my last emails I talked about how some online communities in the tech space devolve over time and turn into cesspools of negativity. This relates directly to how and why I started

You Might Also Like

SWLW #595: My role as a founder CTO, AI Product Management, and more.

Friday, April 19, 2024

Weekly articles & videos about people, culture and leadership: everything you need to design the org that makes the product. A weekly newsletter by Oren Ellenbogen with the best content I found

The bill to ban TikTok is barreling ahead

Friday, April 19, 2024

The Morning After It's Friday, April 19, 2024. The bill that could ban TikTok in the United States inches closer to becoming law. The legislation passed the House of Representatives last month,

Digest #134: TDD with Serverless, Terraform AI Conversions, K8s Cost Metrics & OpenTofu Response

Friday, April 19, 2024

Learn to convert Terraform templates, deploy SSR on AWS Amplify, and apply TDD to Serverless. Gain insights on PostgreSQL, microfrontends, and secure APIs. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Akira Ransomware Gang Extorts $42 Million; Now Targets Linux Servers

Friday, April 19, 2024

THN Daily Updates Newsletter cover Webinar -- The Future of Threat Hunting Is Powered by Generative AI From Data to Defense: Step Into the Next Era of Cybersecurity with CensysGPT Download Now

ASP.NET Core News - 04/19/2024

Friday, April 19, 2024

View this email in your browser Get ready for this weeks best blog posts about ASP.NET Core! This newsletter is sponsored by elmah.io - the most advanced, yet so simple to set up, error logging and

Post from Syncfusion Blogs on 04/19/2024

Friday, April 19, 2024

New blogs from Syncfusion Syncfusion Prepares for MS Build 2024 with Cloud-Ready Solutions on Azure Marketplace By gingerr Syncfusion offers cloud-ready solutions in Azure Marketplace for MS Build 2024

Hacker Newsletter #696

Friday, April 19, 2024

The greatest value of a picture is when it forces us to notice what we never expected to see. //John W. Tukey hackernewsletter Issue #696 // 2024-04-19 // View in your browser #Favorites Unlock your

Google's massive reorg 🧑‍🤝‍🧑, Meta's Llama 3 launch 🤖, China bans WhatsApp 💬

Friday, April 19, 2024

Google has reorganized its Android, Chrome, and Google hardware divisions Sign Up |Advertise|View Online TLDR TLDR 2024-04-19 📱 Big Tech & Startups Meta's battle with ChatGPT begins now (5

Is your Notes app completely disorganized?

Friday, April 19, 2024

Hi there, Is your Notes app completely disorganized? In a recent survey we found that 77% of our readers would like to learn how to better organize the notes on their iPhone. That's why we're

Data Science Weekly - Issue 543

Friday, April 19, 2024

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