Python Dependencies Management

Mohammed AbuAisha
Stackademic
Published in
2 min readNov 21, 2023

--

I have been working as a software engineer since 2015 and have found Python to be my preferred programming language. This is because it has a short learning curve, and a huge community of support, and can be used in various domains such as DevOps, machine learning, data science, web development, IoT, and even mobile development.

No matter which domain you are working on, your Python projects for sure are likely to use dependencies (SDK, API clients, Wrappers, … etc.) developed by the community or internally by your team. Managing these dependencies could be a nightmare especially when it comes to running or testing your application using different dependencies versions or even under different Python versions. Fortunately, the Python ecosystem provides a lot of tools that can help manage your application’s complex requirements

In this blog, I will focus on a list of top Python tools that can make developers’ lives easier and save a lot of time and effort during Python project development. Before diving into these tools, I will first explain some basic concepts about Python package management & virtual environments.

Package Manager

This is a generic term for a tool that helps to install packages from the official package registry. Python uses pip (default), PHP uses Composer and Ruby uses RubyGems.

Index Registry

This is the location where the developers publish their packages so that others can install and use them. The default index registry used by Python is PyPI, npmjs is used by NodeJS, and packagist by PHP.

PyPI Interface

Virtual Environment

This term gives the power of package isolation in order to avoid the interference between multiple packages with different versions used by the application and most importantly to avoid clashes with the packages installed on the global Python environment.

Let us then deep dive into how Python handles packages using different tools. We are going to divide this blog into 3 main categories across 3 blogs:

  1. Basic Python Dependencies Management (pip, virtualenv and venv)
  2. Advanced Python Dependencies Management (pip-tools, pipenv, and poetry)
  3. Python Applications & Versions Mangement(pipx, pyenv)

Summary

This blog serves as an introduction to my upcoming posts on dependency management using Python. Check the first blog on Basic Python Dependencies Management.

Stackademic

Thank you for reading until the end. Before you go:

  • Please consider clapping and following the writer! 👏
  • Follow us on Twitter(X), LinkedIn, and YouTube.
  • Visit Stackademic.com to find out more about how we are democratizing free programming education around the world.

--

--

Software Development Engineer with +10 years experience, Python developer, interested in DevOps & Cloud Computing