DEV Community

chuongmep
chuongmep

Posted on

How to setup Conda-Forge on macOS (Apple Silicon)

Why Install Conda from Conda-Forge?

Conda is a powerful package manager for Python and other languages, commonly used for data science, machine learning, and software development. While the default Anaconda distribution is popular, the Conda-Forge version provides a lightweight and community-driven alternative.

If you're using an Apple Silicon Mac (M1/M2), installing Miniforge3 from Conda-Forge ensures better performance and compatibility.

Conda-Forge can use under

Step-by-Step Installation

1. Download Miniforge3 (Conda-Forge Version)

Go to the official website: Conda-Forge Miniforge

Download the installer for macOS (ARM64), which is optimized for Apple Silicon.

2. Install Miniforge3

Once downloaded, open a terminal and run:

bash ~/Downloads/Miniforge3-MacOSX-arm64.sh
Enter fullscreen mode Exit fullscreen mode

Follow the on-screen instructions to complete the installation.

3. Verify Installation

After installation, check if Conda is installed:

/Users/your-username/miniforge3/bin/conda --version
Enter fullscreen mode Exit fullscreen mode

(Replace your-username with your actual username.)

If Conda is installed correctly, you should see the version output.

Fix: "Command Not Found" Issue After Installation

If you get a "command not found" error when running conda, follow these steps:

1. Add Conda to PATH

Open your terminal and run:

echo 'export PATH="/Users/your-username/miniforge3/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

If using bash instead of zsh, replace ~/.zshrc with ~/.bashrc.

2. Initialize Conda for Your Shell

Run the following command:

/Users/your-username/miniforge3/bin/conda init zsh
Enter fullscreen mode Exit fullscreen mode

For bash, use:

/Users/your-username/miniforge3/bin/conda init bash
Enter fullscreen mode Exit fullscreen mode

Then restart your terminal.

3. Test Conda

Try these commands:

conda --version
conda info
Enter fullscreen mode Exit fullscreen mode

If they work, your installation is now properly configured!

Conclusion

Using Miniforge3 from Conda-Forge ensures a lightweight, Apple Silicon-optimized Conda installation. If you run into issues with conda not being found, setting the correct PATH and initializing Conda should fix it. Enjoy your Conda-powered development environment on macOS!

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

5 Playwright CLI Flags That Will Transform Your Testing Workflow

  • 0:56 --last-failed
  • 2:34 --only-changed
  • 4:27 --repeat-each
  • 5:15 --forbid-only
  • 5:51 --ui --headed --workers 1

Learn how these powerful command-line options can save you time, strengthen your test suite, and streamline your Playwright testing experience. Click on any timestamp above to jump directly to that section in the tutorial!

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay