- Egg files
- Wheel files
- Conda vs Pip
- Conda install vs Pip install
There are many Python tools whose use is not obvious to someone who has only recently started using Python.
Here is a quick list that clarifies a couple of things you will hear about when using Python.
A tool used to package Python projects. Now deprecated, use Setuptools instead.
A tool used to manage Python dependencies.
Use Pip instead.
A format used to distribute Python projects.
Now deprecated, use Wheel files instead.
A package manager for projects hosted at PyPi.
It's a replacement for EasyInstall.
Very simple to use:
$ pip install <libname>.
Similar to RubyGems.
Works nicely with Virtualenv
PyPa is short for Python Packaging Authority.
An organization that defines and oversees everything related to packaging Python projects.
Projects such as Pip and Virtualenv are part of PyPa.
PyPi is short for Python Package Index.
It's a repository for Python packages.
- This is where Pip downloads and installs packages from
A tool for packaging Python projects. It's a replacement for Distutils.
Uses a file named
setup.py located in a project's root (see the links below for a full example on how to package a python project)
A tool you can use to install Python packages (via Pip) all in a single directory rather than globally on your system.
Supports different Python versions and environments in the same machine
If you mess up things, just delete the Virtualenv and start again
Works nicely with Pip
A format used to distribute Python projects. It's a replacement for Egg files.
Wheel files can be created using Pip:
$ pip wheel ...
Wheel files can be directly installed using Pip:
- So if for some reason
pip install <my_package>gives you trouble, you can try to manually download the wheel file for that project and then do
pip install <my_package>.whlinstead.
- So if for some reason
Anaconda is a Python distribution aimed at data science and machine learning workflows.
You can download Anaconda for Windows, Linux, MacOS, etc.
It includes most common Python data science packages such as numpy, pandas, scipy, matplotlib, scikit-learn, etc.
It's a package manager and enviroment manager for Python but also for other languages.
Conda enables you to:
Create/activate enviroments (
Keep track of all enviroments in your machine (
conda info --envs)
Install conda packages in the global scope or within a separate enviroment (
List packages installed in the current enviroment (
It's an installer for Conda.
Conda vs Pip
Roughly, Conda == Pip + Virtualenv
They are not directly comparable as they do different things.3
|Package manager and |
|Package manager only|
|Installs packages available on Anaconda1 |
|Installs packages available on PyPi|
|Tracks all enviroments |
in your system.
|There is no centralized management |
for all virtualenvs in a system.
Conda install vs Pip install
Both commands install a given package into the current environment (either a conda environment or a virtualenv, respectively).
|Conda install||Pip install|
|Downloads and installs prebuilt binary packages||Downloads source files and builds |
Python packages on your machine.2
|Installs packages from Anaconda repos |
and other sources such as conda-forge
|Installs packages from PyPi|
1: On newer versions of conda (4.6+), you can download Pip from within conda and then install and track packages via Pip.
2: Unless you directly install a wheel file, in which case it is already prebuilt for your OS/architecture.
Other relevant posts on this topic
- See Best Practices Checklist at the end of the post