6

I am new to conda and mac (i mostly use Ubuntu and pip). Is there a conda shell on mac (I guess I read somewhere that there is none).

If that is the case, how am I suppose to run command like:

conda env create -f environment.yml

as asked here: https://github.com/datitran/face2face-demo

I opened Anaconda Navigator then > Environment > Create > import > and in Specification File gave path of above environment.yml file.

Is the above step correct? Is there a way to do this via shell in Mac? (I am using macOS Catalina Version 10.15.3)

user1953366
  • 1,341
  • 2
  • 17
  • 27

4 Answers4

15

I am not a Mac user, but I think you can run anaconda commands directly from the terminal, just like in Ubuntu. There's no anaconda prompt in Mac.

  • 1
    Well Anaconda Navigator is installed but when I run it from shell it says zsh: command not found: conda. How can I fix that? – user1953366 Feb 04 '20 at 05:15
  • 7
    This answer is right, `anaconda prompt` exists in windows, not on Mac or Ubuntu. As to your error, you must have said `no` during the installation if `conda` should be added to path. To fix, see the [FAQ](https://docs.anaconda.com/anaconda/user-guide/faq/#installing-anaconda): In order to initialize after the installation process is done, first run `source /bin/activate` and then run `conda init` – FlyingTeller Feb 04 '20 at 10:29
  • 1
    try adding the following to your bashrc file : export PATH=~/anaconda3/bin:$PATH – terminatorash2199 Feb 06 '20 at 06:15
14

I was having the same problem. I opened the Anaconda Navigator program. I clicked on "Environments." Under the working environment, I clicked the right arrow and one of the options was "Open Terminal." When the terminal opened using this sequence, I was able to use the conda commands. Like you I am using Mac OS Catalina.

Liz
  • 305
  • 3
  • 8
  • I had a similar issue as my terminal was zsh instead of bash. Changing the ~/.zshrc instead of bash_profile helped. Credit to [here](https://stackoverflow.com/questions/22465332/setting-path-environment-variable-in-osx-permanently). – kaikun Jul 05 '21 at 15:47
7

if in case you have clicked no during conda installation when it asked if it should be added to path or you just can't access it on your terminal for any other reason:

Run this conda update anaconda-navigator in your terminal.

But most likely it won't work because you don't have access of conda in your shell. What you have to do is run one at time the following steps in your terminal.

1st:

nano ~/.bash_profile

2nd:

export PATH=/usr/local/anaconda3/bin:$PATH

3rd:

source ~/.bash_profile

Then try:

conda

And finally make sure you exited your anaconda navigator, then run this:

conda update anaconda-navigator

This should do it, but if in case don't work out try to install homebrew in your Mac then repeat the steps.

user10078095
  • 83
  • 1
  • 5
0

On installing anaconda on mac it may install conda in the zsh shell. So you may want to test starting the zsh.

$ zsh

and it should start the terminal with the (base)

(base)$ conda --version

Never hurts to double check.

Sunday Ikpe
  • 924
  • 10
  • 17