Ever mixed conda and pip and ended up with a broken conda environment, yet, swear it worked before? This talk explains why! Learn the difference between pip and conda, what happens when you mix them and how to combine them safely using the latest community developed tools and updates in conda.
Users frequently run pip inside their conda environments, sometimes successfully, sometimes with unintentional consequences. Confusing errors and broken environments often lead users to ask: when is it safe to use pip in a conda environment, and when is it not?
In this presentation I will answer this question.
I will begin by discussing the differences between pip and conda (a question conda maintainers get asked a lot!), starting with the specific use-cases of both tools.
This will include an “enlightenment” moment: pip and conda solve slightly different problems, one is a Python package installer, the other is a language agnostic package and environment manager.
I will then explain the differences between .conda packages, tarballs, and Python wheels, revealing how these format differences make interoperability difficult and tool mixing fragile.
Users mix pip and conda not out of carelessness, but because the packaging ecosystem often leaves them no other choice. Users often report, “I tried installing a package I needed with conda, but it didn’t work, so I ran pip install instead and it worked. So why not?”. This mixing, sadly, has bad consequences, which I refer to as “environmental” damage.
I will highlight some of these potential damages in my talk.
Historically, pip and conda were two separate ecosystems. Over time community efforts like conda-pypi have tried to improve interoperability and bridge the gap.
I will explain how the latest updates in conda along with the features in conda-pypi have made it possible to install Python wheels from PyPI directly into conda environments.
I will conclude the presentation with best-practice recommendations for using pip and conda together.
By the end of this presentation, users will have learned when to use pip, when to use conda, why they are different and how to combine them safely.