[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] The Iceberg

Sunday, July 31, 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

[PythonistaCafe] Q&A

Sunday, July 31, 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] Sublime Text is just a blank canvas…

Saturday, July 30, 2022

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*

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

Saturday, July 30, 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

[PythonistaCafe] What's in PythonistaCafe for you?

Saturday, July 30, 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

Linux replacements for antiquated tools, reimagine math with Python and Raspberry Pi, and more

Tuesday, August 16, 2022

Create beautiful PDFs in LaTeX Create beautiful PDFs in LaTeX Opensource.com THE LATEST Our favorite Linux replacements for antiquated open source tools We asked our community of contributors what open

Issue #11: Focused Work by Michael Tigas

Tuesday, August 16, 2022

Today, we're taking a look at Focused Work by Michael Tigas. Focused Work is a powerful timer that helps you have highly productive days. Inspired by the Pomodoro Technique, it's purpose-built

New Blogs on ThomasMaurer.ch for 08/16/2022

Tuesday, August 16, 2022

View this email in your browser Thomas Maurer Cloud & Datacenter Update This is the update for blog posts on ThomasMaurer.ch. Schedule and Run PowerShell Scripts for Azure VMs using Azure

[Python Mastery] What does it mean to "master" Python?

Tuesday, August 16, 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

Using HPC clusters to run simulations & solve complex equations

Tuesday, August 16, 2022

How to select the best processor & HPC system View this email in your browser engineering.com White Paper - How to Select the Best Processor and HPC System for Your Workloads How to Select the Best

Don't miss out: Ready, Set, Actionable search results with Elastic Enterprise Search

Tuesday, August 16, 2022

Tailor-made for participants in tech and non-tech roles elastic | Search. Observe. Protect Search & Stream with Elastic Enterprise Search You've looked for a good movie to watch, but ever

Declining quality of consumer-grade products – 2009 fridge compressor autopsy — and Breaking all macOS security layers with a single vulnerability

Monday, August 15, 2022

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

Meta backs SMB e-commerce app launched by former Facebook engineering manager

Monday, August 15, 2022

TechCrunch Newsletter TechCrunch logo The Daily Crunch logo By Christine Hall and Haje Jan Kamps Monday, August 15, 2022 Hello, Crunchers! Wait, that's kind of a weird nickname, as if you're

JSK Daily for Aug 15, 2022

Monday, August 15, 2022

JSK Daily for Aug 15, 2022 View this email in your browser A community curated daily e-mail of JavaScript news Handling Optimistic Concurrency in Web Frontends Building scalable web applications

Live Long, Vote and Nominate #Noonies2022

Monday, August 15, 2022

for the brightest stars in tech ✨ The Noonies 2022 Greetings, Hackers 👋🏽 As you well know, HackerNoon is recognizing the incredible work of those who have boldly gone where no one has gone before, for