Miniconda or Anaconda

Miniconda and Anaconda come comes with a complete Python distribution that lets you create isolated environments that don’t affect anything else and conda is the tool that manages these environments.

We have tried to collect all tools and libraries which we will use and demonstrate during a CodeRefinery workshop into a Conda environment in the terminal, so that you can create a new and independent environment with all the necessary packages so that it will not affect what you use for your daily programming or projects.

Should I install Miniconda or Anaconda?

Anaconda is more convenient at the beginning since it provides most packages out of the box.

However, in the long term we recommend to have a minimal base system and install packages into project-specific environments, and for this, Miniconda is a better choice. For our workshops we therefore recommend Miniconda to prepare you for the long term and to start with good practices right from the start. Another benefit is the smaller install size and time. Buf if you have Anaconda already, this will also work.

If you have Anaconda and you are using it regularly

You can use your existing Anaconda installation and inside follow: Conda environment in the terminal.

Or, you can probably go through most of the workshop and most of the packages that we will need already are part of Anaconda. If some package is missing, you can then fetch it with the Anaconda Navigator. One disadvantage of using Anaconda is however, that you are more likely to install everything into the base environment whereas the Miniconda approach suggests to use more isolated environments without modifying your base environment.

If you don’t have Miniconda or Anaconda at all

  • From the Miniconda installer page, download Miniconda3 installer with the latest Python version.

  • Follow regular installation instructions for your operating system.

  • Make sure selecting:

    • “Installing just for you”

    • “Add miniconda3 to my PATH environment variable”

    • “Register Miniconda3 as my default Python 3.9”

Setting path to Conda from your terminal shell

This is only needed if you want to use a terminal and make sure the terminal can “see” and run a couple of conda-installed tools and libraries.

Prerequisites

  • You have Bash/Zsh and relatively new version of Conda installed in your computer.

  • You get an error message like conda command not found whey you type conda --version in your shell terminal.

  • After opening a new terminal and typing conda --help you still get conda command not found.

  1. Go to the Miniconda3 (or if you have a relatively new Anaconda, then Anaconda3) folder. You can find it by serching from File Explorer search bar.

  2. Navigate to etc folder, and then to profile.d folder. You will find the conda.sh file.

  3. In the folder, right click and choose “Git Bash Here”. You should be able to see the path to this folder in the Git Bash (something like ~/Miniconda3/etc/profile.d).

  4. Run the following command (type the following and enter):

    $ echo ". '${PWD}'/conda.sh" >> ~/.bashrc
    
  5. Close Git Bash and reopen it.

  6. Verify that now Git Bash can “see” conda by running conda --version

After step 5 you may see this warning but this is nothing to worry about and will not show up the next time you open Git Bash:

WARNING: Found ~/.bashrc but no ~/.bash_profile, ~/.bash_login or ~/.profile.

This looks like an incorrect setup.
A ~/.bash_profile that loads ~/.bashrc will be created for you.

Reference: “Setting Up Conda in Git Bash”, Sep 2020, at Codecademy Forums

Conda path verification

The following command should return a version number in the terminal you plan on using.

$ conda --version