The Adventures of pip and pacman: A Tale of Package Managers

László Kiss Kollár

Abstract

Installing Python packages can be frustrating. If we follow common practices and pip install packages, we will likely hit issues. Installing and managing Python packages is easier if we follow some simple rules. Let’s look at best practices for Python package management via real-world examples.

Description

Overview

Installing Python packages can be frustrating for new (and even not so new) users of Python. If we simply follow the common practice and pip install packages, we will likely hit issues. Installing and managing Python packages is actually quite simple, as long as we follow a few simple rules.

This talk will look at best practices for Python package management using real world examples.

Audience

This talk is aimed mostly at people new to Python but it should also be informative for seasoned users. No Python programming knowledge should be necessary to follow along.

After the talk the audience should have a good idea how to install and manage Python packages in the most common situations.

Outline

Introduction

  • A few words about myself
  • Why deliver a talk about package management

Packaging tools

  • pip
  • OS package managers
  • Which one should we use?

System-wide package installations

  • What are system-wide or global installations?
  • Let's try to install something with pip install (and look at how it can fail)
  • sudo pip install and why you should never do it
  • Conclusion

Non system-wide package installations

  • What are non system-wide installations?
  • User scheme installations, and some situations it doesn't work so well
  • Virtual environments
    • What is it
    • How to create and manage them
    • Working inside a virtual environment
    • Using them without activation
  • Conda
  • Conclusion

Closing

  • Lessons learned
  • The recipe for successful package management

Bio

László Kiss Kollár is a senior software engineer at Bloomberg, where he works on the Python Infrastructure team. He has close to 15 years of industry experience and has worked on a diverse set of projects, such as optimising code for vector processors, creating a distributed JVM, and generating automatically produced news content.