Skip to content
 

Miniconda Python Distribution on Linux

- Posted by: Barbra Lashbrook - January 13, 2021 Back to CIRA Wiki Home



Topic Catagories:
Tags: , , , ,

These steps are for a user-level installation of the Miniconda Python Distribution on Linux operating systems

  1. Select an installer from Miniconda Linux installers (unless you have a good reason for a specific version, the latest one is probably the one you want)
  2. wget or curl the installer to your local directory. Ex: wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh or curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
  3. Run the installation script. Ex: bash ./Miniconda3-latest-Linux-x86_64.sh When you do, you’ll get the message “In order to continue the installation process, please review the license agreement. Please, press ENTER to continue”. After pressing ENTER, you’ll see the license. Read it or press q. Then, type yes to agree. It’ll ask if you want to change the installation path (default is /home/<username>/miniconda3/). You don’t need to. Then, it’ll ask if you want to initialize it. Type yes.
  4. You can check that your installation worked by opening a terminal and typing python. You should enter into a terminal python session and see something like the following:

    [hcronk@gctest01 ~]$ python
    Python 3.8.5 (default, Sep 4 2020, 07:30:14) [GCC 7.3.0] :: Anaconda, Inc. on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>>

    To exit this session type exit() or Ctrl+D

  5. Optional step: Miniconda adds (base) to your command line prompt to indicate what environment you are using. To disable, run conda config --set changeps1 false.
  6. Optional step: If you find that the system-level python installation takes precedence over Miniconda, then open your ~/.bash_profile or ~/.bashrc file, and add the local Miniconda installation path to the beginning of your $PATH environment variable.  You can then source your ~/.bash_profile or ~/.bashrc to put these changes into effect immediately.  Otherwise, the next time you login, the changes will be put into effect.