Anaconda won't work on MacOS (MacBook Air M3 - 15.0.1 (24A348))

So, I installed Anaconda on my Macbook. After installing, I tried running Anaconda Navigator from the app tiles, but it won’t open without any error message.

I tried running the “conda” using the terminal, but a permission error was thrown at me. I will be pasting the error down below:

apoorav@Apooravs-Laptop ~ % conda
Error importing conda-build: [Errno 13] Permission denied: '/Users/apoorav/.config/conda/.condarc'
Error while loading conda entry point: conda-build ([Errno 13] Permission denied: '/Users/apoorav/.config/conda/.condarc')
>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.12/site-packages/conda/exception_handler.py", line 18, in __call__
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.12/site-packages/conda/cli/main.py", line 67, in main_subshell
context.__init__(argparse_args=pre_args)
File "/opt/anaconda3/lib/python3.12/site-packages/conda/base/context.py", line 496, in __init__
self._set_search_path(
File "/opt/anaconda3/lib/python3.12/site-packages/conda/common/configuration.py", line 1423, in _set_search_path
self._search_path = IndexedSet(self._expand_search_path(search_path, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.12/site-packages/boltons/setutils.py", line 125, in __init__
self.update(other)
File "/opt/anaconda3/lib/python3.12/site-packages/boltons/setutils.py", line 355, in update
for o in other:
File "/opt/anaconda3/lib/python3.12/site-packages/conda/common/configuration.py", line 1396, in _expand_search_path
if path.is_file() and (
^^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.12/pathlib.py", line 892, in is_file
return S_ISREG(self.stat().st_mode)
^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.12/pathlib.py", line 840, in stat
return os.stat(self, follow_symlinks=follow_symlinks)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/Users/apoorav/.config/conda/.condarc'
`$ /opt/anaconda3/bin/conda`
  environment variables:
CIO_TEST=<not set>
CONDA_ALLOW_SOFTLINKS=false
CONDA_EXE=/opt/anaconda3/bin/conda
CONDA_PYTHON_EXE=/opt/anaconda3/bin/python
CONDA_ROOT=/opt/anaconda3
CONDA_SHLVL=0
CURL_CA_BUNDLE=<not set>
LD_PRELOAD=<not set>
PATH=/opt/anaconda3/condabin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/
usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/code
x.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/
codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/co
dex.system/bootstrap/usr/appleinternal/bin:/opt/homebrew/bin:/opt/home
brew/bin
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
active environment : None
shell level : 0
user config file : /Users/apoorav/.condarc
 populated config files : 
conda version : 24.5.0
conda-build version : error
python version : 3.12.4.final.0
solver : libmamba (default)
virtual packages : __archspec=1=m1
__conda=24.5.0=0
__osx=15.0.1=0
__unix=0=0
base environment : /opt/anaconda3  (writable)
conda av data dir : /opt/anaconda3/etc/conda
  conda av metadata url : None
channel URLs : https://repo.anaconda.com/pkgs/main/osx-arm64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-arm64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /opt/anaconda3/pkgs
/Users/apoorav/.conda/pkgs
envs directories : /opt/anaconda3/envs
/Users/apoorav/.conda/envs
platform : osx-arm64
user-agent : conda/24.5.0 requests/2.32.2 CPython/3.12.4 Darwin/24.0.0 OSX/15.0.1 solver/libmamba conda-libmamba-solver/24.1.0 libmambapy/1.5.8
UID:GID : 501:20
netrc file : None
offline mode : False
An unexpected error has occurred. Conda has prepared the above report.
If you suspect this error is being caused by a malfunctioning plugin,
consider using the --no-plugins option to turn off plugins.
Example: conda --no-plugins install <package>
Alternatively, you can set the CONDA_NO_PLUGINS environment variable on
the command line to run the command without plugins enabled.
Example: CONDA_NO_PLUGINS=true conda install <package>
If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers? [y/N]: y
Upload did not complete.
Thank you for helping to improve conda.
Opt-in to always sending reports (and not see this message again)
by running
$ conda config --set report_errors true

So, I kind of worked out this thing for me.

First I was not sure why this problem was happening so to rule out any issue I factory reset my MacBook.

The first thing after the reset I installed Anaconda and it did get installed without any hiccups.

But there was another problem that poped up. I was using “brew” installer for command line utilities and for some reason it stopped working. The error was similar “command not found”.

Thanks to the community of brew I found out the real issue, it was “~/.zshrc” file that needs to be edited to get your command running.

For reference I am adding the contents of the file. Hope it helps.

Cheers!

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/opt/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/opt/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/opt/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

export PATH="/opt/homebrew/bin:$PATH"

Normally Anaconda is installed in your user account not under opt. Using the anaconda.sh file that is downloaded directly from continuum, you should be able to just follow the installayion instructions. based on your initial post, It looks like it’s a permission issue. Don’t use sudo to launch it, instead check what the permissions are and change them accordingly.

ls -l /Users/apoorav/.config/conda/.condarc check that it’s owned by apoorav
ls -ld /Users/apoorav/.config/conda check that it’s owned by apoorav

You may need to change permissions,
sudo chown apoorav:staff /Users/apoorav/.config/conda/.condarc
sudo chown -R apoorav:staff /Users/apoorav/.config/conda
chmod 644 /Users/apoorav/.config/conda/.condarc