1

I recently downloaded Anaconda, mainly since I want to work with Spyder. Today when running Spyder I was told that there is a new update:

Spyder 4.0.1 is available!

Please use your package manager to update Spyder or go to our Releases page to download this new version.

If you are not sure how to proceed to update Spyder please refer to our Installation instructions.

I was not sure how to priceed to updatae, so I clicked the "Installation" link, where it tells me that to update Spyder, all I needed to do would be to run conda update anaconda to update the whole distribution, or run conda update spyder to update spyder specifically.

But when I open a terminal (I am on Mac OS 10.15.3 and enter either of those lines I get zsh: command not found: conda.

What am I doing wrong?

Britzel
  • 205
  • 3
  • 8
  • What happens if you run `eval "$(/Users/Brizel-or-whatever-your-username-is/anaconda3/bin/conda shell.zsh hook)"` at your Terminal, replacing `/Users/Brizel-or-whatever-your-username-is` with whatever the output of "`echo $HOME`" (without the quotes) is? – jjramsey Mar 06 '20 at 15:52
  • 1
    You didn't add anaconda to your path (the option that isn't recommended when you're installing, but it's quite useful if you're not too computer-savvy). I don't know much about MacOS, but google how to add your anaconda installation to your path and you should have no problem. Also the anaconda command prompt might working without adding anything to your path – Juan C Mar 06 '20 at 15:52
  • @jjramsey I get: `zsh: no such file or directory: /Users/my_user_name/anaconda3/bin/conda`. – Britzel Mar 06 '20 at 16:18
  • @JuanC How can I access the anaconda command prompt? – Britzel Mar 06 '20 at 16:19
  • Where did you install Anaconda? I'm guessing it's not in `/Users/my_user_name/anaconda3`. – jjramsey Mar 06 '20 at 16:44
  • write anaconda prompt in your search bar and it should appear – Juan C Mar 06 '20 at 17:07
  • @jjramsey Don't ask me why, but my installation is in `/Users/my_username/opt/anaconda3`. I now tried to first get into this folder by using cd /path, and then execute `conda update anaconda` from there, but I still get back `zsh: command not found: conda`. Same if I execute the command from within the anaconda3/bin folder. – Britzel Mar 09 '20 at 15:28
  • @JuanC It does not. : ( – Britzel Mar 09 '20 at 15:29
  • If `conda` isn't in your `PATH`, then changing to the `/Users/my_username/opt/anaconda3` directory won't help you. Try running `eval "$(/Users/my_username/opt/anaconda3/bin/conda shell.zsh hook)"`. – jjramsey Mar 09 '20 at 16:00
  • @jjramsey This worked, thanks a lot! Will I have to run this line again when I upgrade in the future? – Britzel Mar 10 '20 at 11:03
  • Sort of. It's not really a matter of upgrading per se. What that line did was change assorted environment variables, which among other things, added `/Users/my_username/opt/anaconda3/bin` to the environment variable `PATH`. You might try adding that line to your `~/.zprofile`, which would avoid having to retype it in the future. – jjramsey Mar 10 '20 at 12:23
  • Does this answer your question? [Zsh: Conda/Pip installs command not found](https://stackoverflow.com/questions/31615322/zsh-conda-pip-installs-command-not-found) – AMC Mar 10 '20 at 23:04
  • @AMC No, since I don't even understand the linked question. My question is answered now by the comments here. – Britzel Mar 11 '20 at 14:12

1 Answers1

0

To use this command, you will have to change directories to the install of anaconda, you wouldn’t have to do this if it was a global variable, but since you got that error it isn’t.

BeastCoder
  • 2,391
  • 3
  • 15
  • 26
  • thanks for help! My anaconda installation is in /Users/my_user_name/opt/anaconda3. I tried to execute `conda update spyder ` from within there, but I still get the same reply `zsh: command not found: conda` as before. I also tried to execute it from within …/anaconda3/bin with the same result. – Britzel Mar 09 '20 at 15:24
  • Hmm, add the bin folder of anaconda to your PATH environment variable. That should allow you to run it. If that doesn’t work, however, you may need to uninstall and reinstall. – BeastCoder Mar 10 '20 at 10:56