Skip to content

Instantly share code, notes, and snippets.

@ryanorsinger
Last active May 19, 2024 16:13
Show Gist options
  • Save ryanorsinger/7d89ad58901b5590ec3e1f23d7b9f887 to your computer and use it in GitHub Desktop.
Save ryanorsinger/7d89ad58901b5590ec3e1f23d7b9f887 to your computer and use it in GitHub Desktop.
Installing Homebrew and Anaconda

Installing Homebrew and Anaconda on a Mac

Install Homebrew

Run the following command on your terminal to install Homebrew. Homebrew is a package manager for Macs and is used to install useful development tools and software.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install Anaconda through Homebrew

  1. Run brew install --cask anaconda to install Anaconda
  2. Run echo 'export PATH=/usr/local/anaconda3/bin:$PATH' >> ~/.zshrc from your terminal
  3. Also run echo 'export PATH=/opt/homebrew/anaconda3/bin:$PATH' >> ~/.zshrc from your terminal
  4. Run source ~/.zshrc from your terminal
  5. Type conda to ensure that anaconda linked correctly.

If you use bash instead of zsh, replace steps 2 and 3 from above with the following:

  • echo 'export PATH=/usr/local/anaconda3/bin:$PATH' >> ~/.bash_profile
  • echo 'export PATH=/opt/homebrew/anaconda3/bin:$PATH' >> ~/.bash_profile
  • source ~/.bash_profile

If you've already installed anaconda from the installation file from anaconda.org

If you installed Anaconda for only this user, run the following:

  • echo 'export PATH=/Users/$USER/anaconda3/bin:$PATH' >> ~/.zshrc
  • echo 'export PATH=/opt/homebrew/anaconda3/bin:$PATH' >> ~/.zshrc
  • source ~/.zshrc

If you installed Anaconda for all users on your computer, then run the following:

  • echo 'export PATH=/opt/anaconda3/bin:$PATH' >> ~/.zshrc
  • source ~/.zshrc
@telnet2
Copy link

telnet2 commented May 12, 2024

If zsh users get "conda not found", then running /opt/homebrew/anaconda3/bin/conda init zsh from the terminal is apparently the way forward w/ zshell since anaconda no longer suggests modifying the path

thanks! this was exactly what helped me!

@sangiliarumugam
Copy link

Thanks. These post-installation steps should be added to the installation script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment