2

Using: MacOS Monterey v12.2, Apple M1 Pro chip.

After installation of homebrew and using it to install miniconda with this command 'brew install --cask miniconda' on the mac terminal, it states that conda is not found.

Yet, if i key the command 'brew list' on mac terminal, miniconda is seen in the casks.

(Q1) How to resolve the above i.e. make miniconda work via this homebrew download method? (Also, it seems like unlike in intel MacOS, miniconda is stored in this directory -> "opt/homebrew/Caskroom/miniconda/base" in M1 MacOS)

(Q2) Alternatively, i downloaded the miniconda installer (from https://docs.conda.io/en/latest/miniconda.html). This miniconda installer works and it seems to reside in a different path -> "/Users/xxxx/opt/miniconda3" (refer to Image 1). Concern that there might be conflict if there are two miniconda in my macOS. So then, how can i remove the miniconda which i downloaded earlier via homebrew? The command 'brew uninstall miniconda' or ''brew uninstall --cask miniconda' did not work? (refer to Image 2)

enter image description here

enter image description here

Postman
  • 51
  • 2

1 Answers1

0

I kept running into these kinds of problems with python on my M1 Mac until I went completely to Rosetta on the command line wrt python. For that, I did the following:

  1. Update Rosetta: In a Terminal type:
softwareupdate --install-rosetta
  1. In Finder, type G and go to /Applications/Utilities. Then duplicate Terminal:

enter image description here

  1. Rename the second Terminal to "Rosetta" (or whatever you like) and have it execute in Rosetta by checking "Open using Rosetta" in the "Get Info" dialogue:

enter image description here

  1. Open a Rosetta Terminal and make sure it shows i386 when you issue the command arch:

enter image description here

  1. In that terminal, install homebrew (per the homebrew homepage):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. Once homebrew has been installed, install miniconda using homebrew:
brew install --cask miniconda
  1. Create a conda environment, for instance here a python 3.9 env named py39:
conda create -n py39 python=3.9
  1. Activate the environment:
conda activate py39

From here on out, you have a fully functioning i386 Python system. This has resolved all problems that I had with Numpy, Pandas, Azure, etc. on my M1 Mac.

Daniel Schneider
  • 1,797
  • 7
  • 20