Anaconda is the answer (stop using your distribution's python)

I wrote this because I’m tired of watching friends struggle with python installs when there is a better way.

Say you’re like me and you love using python for numerics, signal processing, and data analysis. You really need to be using Continuum’s Anaconda python distribution.

Anaconda:

  1. is incredibly up-to-date (new numpy! new scipy! New pandas! new ipython!)
  2. is really cross platform (same versions on OSX and linux)
  3. does not touch the system python at all.

Anaconda can be installed by:

  1. wget the tarball-script (wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda2-2.4.0-Linux-x86_64.sh or whatever the latest download link is)
  2. run and install into ~/anaconda
  3. preprend ~/anaconda/bin to your path

Done! Seriously that’s it. You installed it in your hoemdir, it doesn’t require root, and you can call your system python anytime with /usr/bin/python.

If you want to update a package like pandas, you just do:

jonas$ conda update pandas
Fetching package metadata: ........
Solving package specifications: .....................
Package plan for installation in environment /Users/jonas/anaconda:

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    pytz-2015.7                |           py27_0         174 KB
    conda-3.18.6               |           py27_0         176 KB
    pandas-0.17.1              |      np110py27_0         6.3 MB
    ------------------------------------------------------------
                                           Total:         6.6 MB

The following packages will be UPDATED:

    conda:  3.18.4-py27_0     --> 3.18.6-py27_0
    pandas: 0.16.2-np19py27_0 --> 0.17.1-np110py27_0
    pytz:   2015.6-py27_0     --> 2015.7-py27_0

Proceed ([y]/n)?

Note that pip still works to install things raw from github, or source, or pypi.

Anaconda is the ubuntu of python – installs just work and it’s a breath of fresh air.

What if you accidentally fuck up your anaconda install? Blow away ~/anaconda and reinstall in 5 min!

Related