Introduction

The first step on working with Python project is the dependency management. To avoid dependencies conflict on your machine, you should consider handling dependencies with some of the Python. There are several options to handle dependencies:

  • Pipenv is a tool that aims to bring the best of all packaging worlds (bundler, composer, npm, cargo, yarn, etc.) to the Python world. It automatically creates and manages a virtualenv for your projects, as well as adds/removes packages from your Pipfile as you install/uninstall packages. It also generates the ever-important Pipfile.lock, which is used to produce deterministic builds.
  • Conda is an open source package management system and environment management system that runs on Windows, macOS, and Linux. Conda quickly installs, runs and updates packages and their dependencies. Conda easily creates, saves, loads and switches between environments on your local computer. It was created for Python programs, but it can package and distribute software for any language.


The software stack is made by several layers as you can see from the image below, therefore Python dependencies are only one layer in the all stack. Beside selecting packages to be installed, we also have to consider the Python interpreter version (e.g. 3.8). Both Pipenv and Conda allows you to select also the interpreter.

Manage Python security with Thoth's cloud-based dependency ...

Image source: https://thoth-station.ninja/

How to install pipenv

https://pipenv.pypa.io/en/latest/install/


How to install conda

https://docs.conda.io/projects/conda/en/latest/user-guide/install/linux.html