[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

[Python Dependency Pitfalls] The Iceberg

Sunday, April 10, 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

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

Saturday, April 9, 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, April 9, 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 Dependency Pitfalls] Artisanal "from-scratch" development

Friday, April 8, 2022

Hey there, The other day I got this question from Newsletter member Newvick in my email inbox: ~~~ I'm trying to get past the beginner's stage in Python and one problem I have is: When do you

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

Friday, April 8, 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

You Might Also Like

AI search engine startup Perplexity eyes a $3B valuation

Tuesday, April 23, 2024

Plus: It's Tesla earnings day and AWS wants to host your AI models View this email online in your browser By Cody Corrall Tuesday, April 23, 2024 Welcome back to TechCrunch PM. Today we have big

🎞️ We Tried 3D Printing a Photo — You'll Love This Secret Samsung Galaxy Bluetooth Feature

Tuesday, April 23, 2024

Also: Transferring Your Phone Number to a New Carrier, and More! How-To Geek Logo April 23, 2024 📩 Get expert reviews, the hottest deals, how-to's, breaking news, and more delivered directly to

You're invited – product sense, prioritization, careers

Tuesday, April 23, 2024

Product Sense Product Sense Wednesday, May 1st @ 01:00 PM EST Learn how to identify opportunities, assess risks, and make informed decisions that lead to successful product innovations by better

CTRL-C, Exceptions, Ruff Speed-up, and More

Tuesday, April 23, 2024

Asyncio Handle Control-C (SIGINT) #626 – APRIL 23, 2024 VIEW IN BROWSER The PyCoder's Weekly Logo Asyncio Handle Control-C (SIGINT) When the user presses CTRL-C on the keyboard, the OS raises an

Writing Contests Just Landed On Product Hunt 🔥

Tuesday, April 23, 2024

Upvote us to keep the $$$ coming! 👍 ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌ ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌ ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌ ͏ ‌  ͏ ‌  ͏ ‌  ͏ ‌ 

Daily Coding Problem: Problem #1421 [Hard]

Tuesday, April 23, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Uber. Given an array of integers, return a new array such that each element at index i

Ranked | The Top 10 EV Battery Manufacturers 🔋

Tuesday, April 23, 2024

Asia dominates this ranking of the world's largest EV battery manufacturers in 2023. See which battery makers feature in the top 10. View Online | Subscribe Presented by: EnergyX's

Bringing PGO to the build pipeline

Tuesday, April 23, 2024

Plus how Go grew at Google, cmp.Or, and ways to visualize makefiles, Go binaries, and live Go processes. | #​504 — April 23, 2024 Unsub | Web Version Together with Three Dots Labs Go Weekly How Dolt

Noonification: Leetcode: Two-sum an Intuitive Approach

Tuesday, April 23, 2024

Top Tech Content sent at Noon! Get Algolia: AI Search that understands How are you, @newsletterest1? 🪐 What's happening in tech this week: The Noonification by HackerNoon has got you covered with

The best AI chatbot for coding

Tuesday, April 23, 2024

9 video gadget must-haves; 6 things Linux should borrow from MacOS -- ZDNET ZDNET Tech Today - US April 23, 2024 placeholder Can Meta AI code? I tested it against Llama, Gemini and ChatGPT - it wasn