4. Manage Your Python Version
Install¶
Mac¶
- Install
wget
brew install wget
- 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¶
- Install
wget
sudo apt install wget
- 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¶
- Respond to install prompts
- Accepts the license
- Accept the default install location
- Accept default to not update shell profile
- Run
conda init
- This will add the conda init to your
.bashrc
file
- This will add the conda init to your
- If not done already, add sourcing
.bashrc
to your.bash_profile
so conda is initialized when your terminal loadssource ~/.bashrc
- Now when you open your terminal and run the command
conda
you will see:
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}
- Note: If it asks you to select y/n, enter "y"
- Activate conda environment
conda activate {name}
- Deactivate conda environment
source deactivate