How to open conda shell in mac
Asked Answered
B

5

7

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)

Broca answered 4/2, 2020 at 5:5 Comment(0)
S
18

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.

Senna answered 4/2, 2020 at 5:11 Comment(3)
Well Anaconda Navigator is installed but when I run it from shell it says zsh: command not found: conda. How can I fix that?Broca
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: In order to initialize after the installation process is done, first run source <path to conda>/bin/activate and then run conda initVassal
try adding the following to your bashrc file : export PATH=~/anaconda3/bin:$PATHSenna
J
19

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.

Jazminejazz answered 6/4, 2021 at 13:22 Comment(1)
I had a similar issue as my terminal was zsh instead of bash. Changing the ~/.zshrc instead of bash_profile helped. Credit to here.Substitution
S
18

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.

Senna answered 4/2, 2020 at 5:11 Comment(3)
Well Anaconda Navigator is installed but when I run it from shell it says zsh: command not found: conda. How can I fix that?Broca
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: In order to initialize after the installation process is done, first run source <path to conda>/bin/activate and then run conda initVassal
try adding the following to your bashrc file : export PATH=~/anaconda3/bin:$PATHSenna
C
8

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.

Canoe answered 22/6, 2020 at 9:39 Comment(0)
E
1

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.

Episodic answered 21/12, 2021 at 4:2 Comment(0)
M
0

Just run in your terminal:

. /opt/anaconda3/bin/activate && conda activate /opt/anaconda3
Mamba answered 22/5, 2024 at 9:18 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.