Python 3

Python 3 is the default. This container uses the anaconda python distribution.


In [1]:
!which python


/opt/conda/bin/python

In [2]:
!python --version


Python 3.4.3 :: Continuum Analytics, Inc.

Installing additional packages

In python 3 notebooks you get everything that is installed in the default environment.

This container is a "base" container, to further customise it you should create your own docker container that inherits from this one and install things there.

To quickly try out a new package from the notebook simply run:


In [1]:
!conda install -y scikit-learn


Fetching package metadata: ....
Solving package specifications: .............
Package plan for installation in environment /opt/conda:

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    conda-env-2.4.2            |           py34_0          24 KB
    nose-1.3.7                 |           py34_0         195 KB
    numpy-1.10.1               |           py34_0         5.8 MB
    python-3.4.3               |                2        15.3 MB
    requests-2.8.1             |           py34_0         647 KB
    scipy-0.16.0               |      np110py34_1        23.4 MB
    setuptools-18.4            |           py34_0         346 KB
    wheel-0.26.0               |           py34_1          77 KB
    conda-3.18.3               |           py34_0         179 KB
    pip-7.1.2                  |           py34_0         1.5 MB
    scikit-learn-0.16.1        |      np110py34_0         7.9 MB
    ------------------------------------------------------------
                                           Total:        55.3 MB

The following NEW packages will be INSTALLED:

    libgfortran:  1.0-0             
    nose:         1.3.7-py34_0      
    numpy:        1.10.1-py34_0     
    openblas:     0.2.14-3          
    scikit-learn: 0.16.1-np110py34_0
    scipy:        0.16.0-np110py34_1

The following packages will be UPDATED:

    conda:        3.14.1-py34_0 --> 3.18.3-py34_0     
    conda-env:    2.4.1-py34_0  --> 2.4.2-py34_0      
    openssl:      1.0.1k-1      --> 1.0.2d-0          
    pip:          7.1.0-py34_1  --> 7.1.2-py34_0      
    python:       3.4.3-1       --> 3.4.3-2           
    requests:     2.7.0-py34_0  --> 2.8.1-py34_0      
    setuptools:   18.0.1-py34_0 --> 18.4-py34_0       
    wheel:        0.24.0-py34_0 --> 0.26.0-py34_1     

Fetching packages ...
conda-env-2.4. 100% |################################| Time: 0:00:00 159.28 kB/s
nose-1.3.7-py3 100% |################################| Time: 0:00:00 315.10 kB/s
numpy-1.10.1-p 100% |################################| Time: 0:00:06 964.64 kB/s
python-3.4.3-2 100% |################################| Time: 0:00:56 283.22 kB/s
requests-2.8.1 100% |################################| Time: 0:00:01 589.47 kB/s
scipy-0.16.0-n 100% |################################| Time: 0:00:25 975.14 kB/s
setuptools-18. 100% |################################| Time: 0:00:00 431.76 kB/s
wheel-0.26.0-p 100% |################################| Time: 0:00:00 243.09 kB/s
conda-3.18.3-p 100% |################################| Time: 0:00:00 315.15 kB/s
pip-7.1.2-py34 100% |################################| Time: 0:00:07 214.81 kB/s
scikit-learn-0 100% |################################| Time: 0:00:09 855.94 kB/s
Extracting packages ...
[      COMPLETE      ]|###################################################| 100%
Unlinking packages ...
[      COMPLETE      ]|###################################################| 100%
Linking packages ...
[      COMPLETE      ]|###################################################| 100%

In [2]:
# You now have scikit-learn
import sklearn