Installing Anaconda

Follow these steps to install and set up your system with Anaconda.

A number of the Deep Learning frameworks require Anaconda. Anaconda is a platform-agnostic data science distribution with a collection of 1,000+ open source packages with free community support.

Anaconda is distributed in two different installers:

  • Anaconda2 default environment is Python 2.7
  • Anaconda3 default environment is Python 3.7

Both versions of Anaconda can create Python 2.7 and Python 3.6 environments.

The version of Anaconda tested and supported for this release of PowerAI is version 2018.12.

Note: These command line instructions assume Anaconda2; if you are using Anaconda3, replace 2 with 3 when running the commands.
  1. Download Anaconda:
  2. Install Anaconda
    1. Accept the license agreement
    2. Specify an installation location (default is $HOME/anaconda2)
    3. For setups that have a single Anaconda instance for multiple users, such as Watson Machine Learning Accelerator, reply no to update the .bashrc file. After the installation is complete, export the path with this command:
      export PATH=/opt/anaconda2/bin:$PATH
    4. For other PowerAI users, reply yes to allow the installer to update the .bashrc file. In this case, if multiple users are using the same system, each user should install Anaconda individually.
  3. Update your terminal with changes to .bashrc:
    source ~/.bashrc
  4. Pin the Conda package (within anaconda) to a known good version of Conda tested with PowerAI:
    echo "conda=4.5.12" >> $HOME/anaconda2/conda-meta/pinned

    Note that the Conda commands may warn that a new version of Conda exists and provide a command to update Conda. This warning can be safely ignored. As the Conda version is pinned, running the upgrade will have no effect.

Note: If using Anaconda3 the base environment is Python 3.7, which is not supported with PowerAI. Either downgrade the base environment to Python 3.6 or create a new environment that is Python 3.6
conda install python=3.6


conda create -n powerai_env python=3.6
conda activate powerai_env

In some instances, the Anaconda environment can incorrectly select a package from the general 'free' channel instead of the higher priority 'PowerAI' channel, potentially causing an undesired package variant to be installed. You can avoid this action by overriding the Anaconda 'default_channel' by running the following config commands:

conda config --add default_channels


conda config --add default_channels