How to use Conda across users in Mac Terminal

Viewed 143

I have two user accounts on my system (MacOS). My main account was A and I recently created B. I originally installed Anaconda as user A, before user B was created. I can open Anaconda Navigator in user B and use all modules, but when I enter any conda commands on the terminal, I get a command not found: conda error.

Why is that and what should I do to run Conda from the command line in user B?

2 Answers

When Conda installs, it adds a section of code to the user's .bash_profile (or .zshrc if using zsh shell). Copying that section to the corresponding file in the new user's home may be sufficient to get the conda command and conda activate working.

You may also want to copy some or all of the settings in the .condarc file. For example, you likely want the pkgs_dirs configured to point to original user's location (hint: try running conda config --show-sources and conda config --show to see the current settings).

Related