Skip to content

4. Manage Your Python Version

Install

Mac

  1. Install wget
    brew install wget
    
  2. Install Mambaforge
    wget "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
    bash Mambaforge-$(uname)-$(uname -m).sh
    

Windows WSL/ Linux

  1. Install wget
    sudo apt install wget
    
  2. Install Mambaforge
    wget "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
    bash Mambaforge-$(uname)-$(uname -m).sh
    source ~/.bashrc
    

Shared Install Instructions

  1. Respond to install prompts
    • Accepts the license
    • img
    • Accept the default install location
    • img
    • Accept default to not update shell profile
    • img
    • img
  2. Run conda init
    • img
    • This will add the conda init to your .bashrc file
    • img
  3. If not done already, add sourcing .bashrc to your .bash_profile so conda is initialized when your terminal loads
    source ~/.bashrc
    
  4. Now when you open your terminal and run the command conda you will see:
  5. img

Useful Mambaforge Commands

  • Create new conda python virtual environment
    • Note: If it asks you to select y/n, enter "y"
      conda create -n {name} python={version}
      
  • Activate conda environment
    conda activate {name}
    
  • Deactivate conda environment
    source deactivate