[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

[PythonistaCafe] What makes PythonistaCafe different

Thursday, July 14, 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

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

Tuesday, July 12, 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*

[PythonistaCafe] What's in PythonistaCafe for you?

Tuesday, July 12, 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

Monday, July 11, 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

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

Monday, July 11, 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

📧 Modular Monolith Architecture is now LIVE! 🎉

Thursday, April 25, 2024

​ MMA is now LIVE! The day has finally come. ​Modular Monolith Architecture is now open for enrollment. ​ I can't wait for you to see everything I prepared! 10 in-depth chapters 60+ high-quality

Testing the Rabbit R1's AI assistant

Thursday, April 25, 2024

The Morning After It's Thursday, April 25, 2024. Back in January, startup Rabbit revealed its first device at CES 2024. The R1 is an adorable, vibrant orange AI machine with a camera, scroll wheel,

Zero-Day Alert: State-Sponsored Hackers Exploting Two Cisco Flaws for Espionage

Thursday, April 25, 2024

THN Daily Updates Newsletter cover Coding with AI For Dummies ($18.00 Value) FREE for a Limited Time Boost your coding output and accuracy with artificial intelligence tools Download Now Sponsored

Post from Syncfusion Blogs on 04/25/2024

Thursday, April 25, 2024

New blogs from Syncfusion How BoldSign Improved HR Operations at Syncfusion By Syncfusion HR Team Let's see how Syncfusion's BoldSign revolutionizes HR operations with seamless document

😩Not Another iPad Caaaase!

Thursday, April 25, 2024

The last iPad case you need. See the most loved features you can't live without. The form and style of ZUGU cases have evolved naturally, resulting from designing products that safeguard your

Edge 390: Diving Into Databricks' DBRX: One of the Most Impressive Open Source LLMs Released Recently

Thursday, April 25, 2024

The model uses an MoE architecture which exhibits remarkable perfromance on a relatively small budget. ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

US TikTok ban 📱, Meta's $200B drop 📉, Node.js 22 👨‍💻

Thursday, April 25, 2024

President Joe Biden has signed into law a bill that orders TikTok owner ByteDance to sell the company within 270 days or lose access to the US market Sign Up |Advertise|View Online TLDR Together With

Learning about Android Runtime

Thursday, April 25, 2024

View in browser 🔖 Articles Learning about Android Runtime I always enjoy reading articles that explore how something works under the hood. Here's an article that does exactly that, providing

Stripe changes its … stripes

Wednesday, April 24, 2024

TikTok on the president's docket and Nvidia acquires Run:ai View this email online in your browser By Christine Hall Wednesday, April 24, 2024 Good afternoon, and welcome to TechCrunch PM! Today

💪 You Can Use Copilot AI as a Personal Trainer — Why Your Laptop Needs a Docking Station

Wednesday, April 24, 2024

Also: Here's How to Make Your Apple ID Recoverable, and More! How-To Geek Logo April 24, 2024 📩 Get expert reviews, the hottest deals, how-to's, breaking news, and more delivered directly to