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 mixing tools unreliable.
Users end up mixing pip and conda because sometimes the packaging ecosystem leaves them no other choice. Users often report, "I tried installing a package with conda, but it didn't work, so I ran pip install instead and it worked”. This mixing, sadly, has consequences, which I refer to as “environmental damage”.
I will highlight this damage in my talk.
pip and conda are two separate ecosystems but over time many community efforts (most recent being conda-pypi), have tried to improve interoperability. I will explain how the latest updates in conda along with the features in conda-pypi have now made it possible to conda install Python wheels from PyPI directly into conda environments. Thereby bringing us a step closer to better interoperability.
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.
Here is a link to the conda-pypi repository on GitHub: https://github.com/conda-incubator/conda-pypi
Time outline of the presentation: 3 mins- self introduction and introduction to the topic (what to expect) 5 mins- difference between pip and conda and their use cases 10 mins- different package formats, problems with mixing pip and conda 5 mins- wheels support feature in conda-pypi and updates in conda 5 mins- how it helps users and best practices 2 mins- closing remarks