Wednesday 21 March 2018

How to install Anaconda in OSX Terminal


What is Anaconda?
Anaconda distribution = Python + Data Science Python packages (like Scikit-learn, TensorFlow, SciPy) + conda package and virtual environment manager.

Download Anaconda installer for OSX here. I chose Python 3.6 version, 64-Bit Command-Line Installer. At the time of writing that was file: Anaconda3-5.1.0-MacOSX-x86_64.sh.

How to install Anaconda in OSX Terminal?

Output:


$ bash Anaconda3-5.1.0-MacOSX-x86_64.sh

Welcome to Anaconda3 5.1.0

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>
===================================
Anaconda End User License Agreement
===================================

Copyright 2015, Anaconda, Inc.

All rights reserved under the 3-clause BSD License:

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of Anaconda, Inc. ("Anaconda, Inc.") nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANACONDA, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Notice of Third Party Software Licenses
=======================================

Anaconda Distribution contains open source software packages from third parties. These are available on an "as is" basis and subject to their individual license agreements. These licenses are available in Anaconda Distribution or at http://docs.anaconda.com/anaconda/pkg-docs. Any binary packages of these third party tools you obtain via Anaconda Distribution are subject to their individual licenses as well as the Anaconda license. Anaconda, Inc. reserves the right to change which third party tools are provided in Anaconda Distribution.

In particular, Anaconda Distribution contains re-distributable, run-time, shared-library files from the Intel(TM) Math Kernel Library ("MKL binaries"). You are specifically authorized to use the MKL binaries with your installation of Anaconda Distribution. You are also authorized to redistribute the MKL binaries with Anaconda Distribution or in the conda package that contains them. Use and redistribution of the MKL binaries are subject to the licensing terms located at https://software.intel.com/en-us/license/intel-simplified-software-license. If needed, instructions for removing the MKL binaries after installation of Anaconda Distribution are available at http://www.anaconda.com.

Anaconda Distribution also contains cuDNN software binaries from NVIDIA Corporation ("cuDNN binaries"). You are specifically authorized to use the cuDNN binaries with your installation of Anaconda Distribution. You are also authorized to redistribute the cuDNN binaries with an Anaconda Distribution package that contains them. If needed, instructions for removing the cuDNN binaries after installation of Anaconda Distribution are available at http://www.anaconda.com.


Anaconda Distribution also contains Visual Studio Code software binaries from Microsoft Corporation ("VS Code"). You are specifically authorized to use VS Code with your installation of Anaconda Distribution. Use of VS Code is subject to the licensing terms located at https://code.visualstudio.com/License.

Cryptography Notice
===================

This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See the Wassenaar Arrangement http://www.wassenaar.org/ for more information.

Anaconda, Inc. has self-classified this software as Export Commodity Control Number (ECCN) 5D992b, which includes mass market information security software using or performing cryptographic functions with asymmetric algorithms. No license is required for export of this software to non-embargoed countries. In addition, the Intel(TM) Math Kernel Library contained in Anaconda, Inc.'s software is classified by Intel(TM) as ECCN 5D992b with no license required for export to non-embargoed countries.

The following packages are included in this distribution that relate to cryptography:

openssl
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols as well as a full-strength general purpose cryptography library.

pycrypto
A collection of both secure hash functions (such as SHA256 and RIPEMD160), and various encryption algorithms (AES, DES, RSA, ElGamal, etc.).

pyopenssl
A thin Python wrapper around (a subset of) the OpenSSL library.

kerberos (krb5, non-Windows platforms)
A network authentication protocol designed to provide strong authentication for client/server applications by using secret-key cryptography.

cryptography
A Python library which exposes cryptographic recipes and primitives.


Do you accept the license terms? [yes|no]
[no] >>> yes

Anaconda3 will now be installed into this location:
/Users/Bojan/anaconda3

- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below

[/Users/Bojan/anaconda3] >>>
PREFIX=/Users/Bojan/anaconda3
installing: python-3.6.4-hc167b69_1 ...
Python 3.6.4 :: Anaconda, Inc.
installing: bzip2-1.0.6-hd86a083_4 ...
installing: ca-certificates-2017.08.26-ha1e5d58_0 ...
installing: conda-env-2.6.0-h36134e3_0 ...
installing: intel-openmp-2018.0.0-h8158457_8 ...
installing: jbig-2.1-h4d881f8_0 ...
installing: jpeg-9b-he5867d9_2 ...
installing: libcxxabi-4.0.1-hebd6815_0 ...
installing: libgfortran-3.0.1-h93005f0_2 ...
installing: libiconv-1.15-hdd342a3_7 ...
installing: libsodium-1.0.15-hd9e47c5_0 ...
installing: lzo-2.10-h362108e_2 ...
installing: pandoc-1.19.2.1-ha5e8f32_1 ...
installing: tk-8.6.7-h35a86e2_3 ...
installing: unixodbc-2.3.4-h4cb4dde_1 ...
installing: xz-5.2.3-h0278029_2 ...
installing: yaml-0.1.7-hc338f04_2 ...
installing: zlib-1.2.11-hf3cbc9b_2 ...
installing: libcxx-4.0.1-h579ed51_0 ...
installing: libpng-1.6.34-he12f830_0 ...
installing: mkl-2018.0.1-hfbd8650_4 ...
installing: openssl-1.0.2n-hdbc3d79_0 ...
installing: expat-2.2.5-hb8e80ba_0 ...
installing: freetype-2.8-h12048fb_1 ...
installing: gmp-6.1.2-hb37e062_1 ...
installing: hdf5-1.10.1-ha036c08_1 ...
installing: icu-58.2-h4b95b61_1 ...
installing: libffi-3.2.1-h475c297_4 ...
installing: libssh2-1.8.0-h322a93b_4 ...
installing: libtiff-4.0.9-h0dac147_0 ...
installing: ncurses-6.0-hd04f020_2 ...
installing: pcre-8.41-hfb6ab37_1 ...
installing: zeromq-4.2.2-ha360ad0_2 ...
installing: gettext-0.19.8.1-h15daf44_3 ...
installing: libcurl-7.58.0-hf30b1f0_0 ...
installing: libedit-3.1-hb4e282d_0 ...
installing: libxml2-2.9.7-hab757c2_0 ...
installing: mpfr-3.1.5-h711e7fd_2 ...
installing: readline-7.0-hc1231fa_4 ...
installing: curl-7.58.0-ha441bb4_0 ...
installing: glib-2.53.6-h33f6a65_2 ...
installing: libxslt-1.1.32-hb819dd2_0 ...
installing: mpc-1.0.3-h7a72875_5 ...
installing: sqlite-3.22.0-h3efe00b_0 ...
installing: dbus-1.12.2-h5243cc1_1 ...
installing: qt-5.6.2-h9975529_14 ...
installing: alabaster-0.7.10-py36h174008c_0 ...
installing: appnope-0.1.0-py36hf537a9a_0 ...
installing: appscript-1.0.1-py36h9e71e49_1 ...
installing: asn1crypto-0.24.0-py36_0 ...
installing: attrs-17.4.0-py36_0 ...
installing: backports-1.0-py36ha3c1827_1 ...
installing: beautifulsoup4-4.6.0-py36h72d3c9f_1 ...
installing: bitarray-0.8.1-py36h1de35cc_1 ...
installing: boto-2.48.0-py36hdbc59ac_1 ...
installing: certifi-2018.1.18-py36_0 ...
installing: chardet-3.0.4-py36h96c241c_1 ...
installing: click-6.7-py36hec950be_0 ...
installing: cloudpickle-0.5.2-py36_1 ...
installing: colorama-0.3.9-py36hd29a30c_0 ...
installing: contextlib2-0.5.5-py36hd66e5e7_0 ...
installing: dask-core-0.16.1-py36_0 ...
installing: decorator-4.2.1-py36_0 ...
installing: docutils-0.14-py36hbfde631_0 ...
installing: entrypoints-0.2.3-py36hd81d71f_2 ...
installing: et_xmlfile-1.0.1-py36h1315bdc_0 ...
installing: fastcache-1.0.2-py36h1de35cc_2 ...
installing: filelock-2.0.13-py36hf9de95b_0 ...
installing: glob2-0.6-py36h94c9186_0 ...
installing: gmpy2-2.0.8-py36hf9c35bd_2 ...
installing: greenlet-0.4.12-py36hf09ba7b_0 ...
installing: heapdict-1.0.0-py36_2 ...
installing: idna-2.6-py36h8628d0a_1 ...
installing: imagesize-0.7.1-py36h3495948_0 ...
installing: ipython_genutils-0.2.0-py36h241746c_0 ...
installing: itsdangerous-0.24-py36h49fbb8d_1 ...
installing: jdcal-1.3-py36h1986823_0 ...
installing: lazy-object-proxy-1.3.1-py36h2fbbe47_0 ...
installing: llvmlite-0.21.0-py36hff739e7_0 ...
installing: locket-0.2.0-py36hca03003_1 ...
installing: lxml-4.1.1-py36hef8c89e_1 ...
installing: markupsafe-1.0-py36h3a1e703_1 ...
installing: mccabe-0.6.1-py36hdaeb55d_0 ...
installing: mistune-0.8.3-py36_0 ...
installing: mkl-service-1.1.2-py36h7ea6df4_4 ...
installing: mpmath-1.0.0-py36hf1b8295_2 ...
installing: msgpack-python-0.5.1-py36h04f5b5a_0 ...
installing: multipledispatch-0.4.9-py36hc5f92b5_0 ...
installing: numpy-1.14.0-py36h8a80b8c_1 ...
installing: olefile-0.45.1-py36_0 ...
installing: pandocfilters-1.4.2-py36h3b0b094_1 ...
installing: parso-0.1.1-py36hc90e01c_0 ...
installing: path.py-10.5-py36h7bcb313_0 ...
installing: pep8-1.7.1-py36_0 ...
installing: pickleshare-0.7.4-py36hf512f8e_0 ...
installing: pkginfo-1.4.1-py36h25bf955_0 ...
installing: pluggy-0.6.0-py36hb1d0581_0 ...
installing: ply-3.10-py36h10e714e_0 ...
installing: psutil-5.4.3-py36h1de35cc_0 ...
installing: ptyprocess-0.5.2-py36he6521c3_0 ...
installing: py-1.5.2-py36ha69170d_0 ...
installing: pycodestyle-2.3.1-py36h83e8646_0 ...
installing: pycosat-0.6.3-py36hee92d8f_0 ...
installing: pycparser-2.18-py36h724b2fc_1 ...
installing: pycrypto-2.6.1-py36h1de35cc_7 ...
installing: pycurl-7.43.0.1-py36hdbc3d79_0 ...
installing: pyodbc-4.0.22-py36h0a44026_0 ...
installing: pyparsing-2.2.0-py36hb281f35_0 ...
installing: pysocks-1.6.7-py36hfa33cec_1 ...
installing: python.app-2-py36h54569d5_7 ...
installing: pytz-2017.3-py36hf0bf824_0 ...
installing: pyyaml-3.12-py36h2ba1e63_1 ...
installing: pyzmq-16.0.3-py36he48b5ad_0 ...
installing: qtpy-1.3.1-py36h16bb863_0 ...
installing: rope-0.10.7-py36h68959ac_0 ...
installing: ruamel_yaml-0.15.35-py36h1de35cc_1 ...
installing: send2trash-1.4.2-py36_0 ...
installing: simplegeneric-0.8.1-py36_2 ...
installing: sip-4.18.1-py36h2824476_2 ...
installing: six-1.11.0-py36h0e22d5e_1 ...
installing: snowballstemmer-1.2.1-py36h6c7b616_0 ...
installing: sortedcontainers-1.5.9-py36_0 ...
installing: sphinxcontrib-1.0-py36h9364dc8_1 ...
installing: sqlalchemy-1.2.1-py36h1de35cc_0 ...
installing: tblib-1.3.2-py36hda67792_0 ...
installing: testpath-0.3.1-py36h625a49b_0 ...
installing: toolz-0.9.0-py36_0 ...
installing: tornado-4.5.3-py36_0 ...
installing: typing-3.6.2-py36haa2d9ef_0 ...
installing: unicodecsv-0.14.1-py36he531d66_0 ...
installing: wcwidth-0.1.7-py36h8c6ec74_0 ...
installing: webencodings-0.5.1-py36h3b9701d_1 ...
installing: werkzeug-0.14.1-py36_0 ...
installing: wrapt-1.10.11-py36hc29e774_0 ...
installing: xlrd-1.1.0-py36h336f4a2_1 ...
installing: xlsxwriter-1.0.2-py36h3736301_0 ...
installing: xlwt-1.2.0-py36h5ad1178_0 ...
installing: babel-2.5.3-py36_0 ...
installing: backports.shutil_get_terminal_size-1.0.0-py36hd7a2ee4_2 ...
installing: bottleneck-1.2.1-py36hbd380ad_0 ...
installing: cffi-1.11.4-py36h342bebf_0 ...
installing: conda-verify-2.0.0-py36he837df3_0 ...
installing: cycler-0.10.0-py36hfc81398_0 ...
installing: cytoolz-0.9.0-py36h1de35cc_0 ...
installing: h5py-2.7.1-py36h39cdac5_0 ...
installing: html5lib-1.0.1-py36h2f9c1c0_0 ...
installing: jedi-0.11.1-py36_0 ...
installing: networkx-2.1-py36_0 ...
installing: nltk-3.2.5-py36h1190bce_0 ...
installing: numba-0.36.2-np114py36hc2f221f_0 ...
installing: numexpr-2.6.4-py36habcfcfe_0 ...
installing: openpyxl-2.4.10-py36_0 ...
installing: packaging-16.8-py36he5e8135_0 ...
installing: partd-0.3.8-py36hf5c4cb8_0 ...
installing: pathlib2-2.3.0-py36h877a6d8_0 ...
installing: pexpect-4.3.1-py36_0 ...
installing: pillow-5.0.0-py36hfcce615_0 ...
installing: pyqt-5.6.0-py36he5c6137_6 ...
installing: python-dateutil-2.6.1-py36h86d2abb_1 ...
installing: pywavelets-0.5.2-py36h2710a04_0 ...
installing: qtawesome-0.4.4-py36h468c6fb_0 ...
installing: scipy-1.0.0-py36h1de22e9_0 ...
installing: setuptools-38.4.0-py36_0 ...
installing: singledispatch-3.4.0.3-py36hf20db9d_0 ...
installing: sortedcollections-0.5.3-py36he9c3ed6_0 ...
installing: sphinxcontrib-websupport-1.0.1-py36h92f4a7a_1 ...
installing: sympy-1.1.1-py36h7f3cf04_0 ...
installing: terminado-0.8.1-py36_1 ...
installing: traitlets-4.3.2-py36h65bd3ce_0 ...
installing: xlwings-0.11.5-py36_0 ...
installing: zict-0.1.3-py36h71da714_0 ...
installing: astroid-1.6.1-py36_0 ...
installing: bleach-2.1.2-py36_0 ...
installing: clyent-1.2.2-py36hae3ad88_0 ...
installing: cryptography-2.1.4-py36h842514c_0 ...
installing: cython-0.27.3-py36h6ecb376_0 ...
installing: datashape-0.5.4-py36hfb22df8_0 ...
installing: distributed-1.20.2-py36_0 ...
installing: get_terminal_size-1.0.0-h7520d66_0 ...
installing: gevent-1.2.2-py36ha70b9d6_0 ...
installing: imageio-2.2.0-py36h5e01289_0 ...
installing: isort-4.2.15-py36hceb2a01_0 ...
installing: jinja2-2.10-py36hd36f9c5_0 ...
installing: jsonschema-2.6.0-py36hb385e00_0 ...
installing: jupyter_core-4.4.0-py36h79cf704_0 ...
installing: matplotlib-2.1.2-py36h6d6146d_0 ...
installing: navigator-updater-0.1.0-py36h7aee5fb_0 ...
installing: nose-1.3.7-py36h73fae2b_2 ...
installing: pandas-0.22.0-py36h0a44026_0 ...
installing: patsy-0.5.0-py36_0 ...
installing: pyflakes-1.6.0-py36hea45e83_0 ...
installing: pygments-2.2.0-py36h240cd3f_0 ...
installing: pytables-3.4.2-py36hfbd7ab0_2 ...
installing: pytest-3.3.2-py36_0 ...
installing: scikit-learn-0.19.1-py36hffbff8c_0 ...
installing: wheel-0.30.0-py36h5eb2c71_1 ...
installing: astropy-2.0.3-py36h1de35cc_0 ...
installing: bkcharts-0.2-py36h073222e_0 ...
installing: bokeh-0.12.13-py36h2f9c1c0_0 ...
installing: flask-0.12.2-py36h5658096_0 ...
installing: jupyter_client-5.2.2-py36_0 ...
installing: nbformat-4.4.0-py36h827af21_0 ...
installing: pip-9.0.1-py36h1555ced_4 ...
installing: prompt_toolkit-1.0.15-py36haeda067_0 ...
installing: pylint-1.8.2-py36_0 ...
installing: pyopenssl-17.5.0-py36h51e4350_0 ...
installing: statsmodels-0.8.0-py36h9c68fc9_0 ...
installing: dask-0.16.1-py36_0 ...
installing: flask-cors-3.0.3-py36h7387b97_0 ...
installing: ipython-6.2.1-py36h3dda519_1 ...
installing: nbconvert-5.3.1-py36h810822e_0 ...
installing: seaborn-0.8.1-py36h595ecd9_0 ...
installing: urllib3-1.22-py36h68b9469_0 ...
installing: ipykernel-4.8.0-py36_0 ...
installing: odo-0.5.1-py36hc1af34a_0 ...
installing: requests-2.18.4-py36h4516966_1 ...
installing: scikit-image-0.13.1-py36h1de35cc_1 ...
installing: anaconda-client-1.6.9-py36_0 ...
installing: blaze-0.11.3-py36h02e7a37_0 ...
installing: jupyter_console-5.2.0-py36hccf5b1c_1 ...
installing: notebook-5.4.0-py36_0 ...
installing: qtconsole-4.3.1-py36hd96c0ff_0 ...
installing: sphinx-1.6.6-py36_0 ...
installing: anaconda-project-0.8.2-py36h9ee5d53_0 ...
installing: jupyterlab_launcher-0.10.2-py36_0 ...
installing: numpydoc-0.7.0-py36he54d08e_0 ...
installing: widgetsnbextension-3.1.0-py36_0 ...
installing: anaconda-navigator-1.7.0-py36_0 ...
installing: ipywidgets-7.1.1-py36_0 ...
installing: jupyterlab-0.31.5-py36_0 ...
installing: spyder-3.2.6-py36_0 ...
installing: _ipyw_jlab_nb_ext_conf-0.1.0-py36h2fc01ae_0 ...
installing: jupyter-1.0.0-py36_4 ...
installing: anaconda-5.1.0-py36_2 ...
installing: conda-4.4.10-py36_0 ...
installing: conda-build-3.4.1-py36_0 ...
installation finished.
Do you wish the installer to prepend the Anaconda3 install location
to PATH in your /Users/Bojan/.bash_profile ? [yes|no]
[yes] >>> yes

Appending source /Users/Bojan/anaconda3/bin/activate in
newly created /Users/Bojan/.bash_profile

For this change to become active, you have to open a new terminal.

Thank you for installing Anaconda3!

===========================================================================

Anaconda is partnered with Microsoft! Microsoft VSCode is a streamlined
code editor with support for development operations like debugging, task
running and version control.

To install Visual Studio Code, you will need:
- Internet connectivity

Visual Studio Code License: https://code.visualstudio.com/license

Do you wish to proceed with the installation of Microsoft VSCode? [yes|no]
>>> no



To verify that installation was successful, we can open Anaconda Prompt by opening the Terminal in /bin directory and run conda's activate script: source activate <envname>.

Before that let's check the list of available environments (environment names):


/Users/Bojan/anaconda3/bin$ conda info --envs
# conda environments:
#
base * /Users/Bojan/anaconda3



To activate Anaconda go to <path_to>/anaconda3/bin and execute:


$ source activate base
(base) $



Note the (base) at the beginning of the command line prompt.

We can now start Python interpreter environment:


(base) $ python
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 12:04:33)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>