Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anaconda not found in ZSh?

I installed Anaconda via command line. The bash file.

If Im in bash, I can open and use anaconda, like notebooks, ipython, etc.

If I change my shell to ZSH, all the anaconda commands appear like "not found".

How I can make it work in zsh?

I use a Mac with OSx Sierra.

Thanks in advance,

like image 988
marz Avatar asked Nov 02 '16 00:11

marz


People also ask

Where is my Anaconda installed Mac?

To see whether Anaconda is installed on your Mac operating system, simply visit the Mac terminal and type Conda info. If Anaconda is installed you will see detailed information for both the Anaconda distribution and Python version.

Should I use zsh or bash?

Zsh is more interactive and customizable than Bash. Zsh has floating-point support that Bash does not possess. Hash data structures are supported in Zsh that are not present in Bash. The invocation features in Bash is better when comparing with Zsh.

Where is Anaconda installed?

The default install location for Anaconda is: (Linux): /home/<your_username>/Anaconda3. (Windows): C:\Users\<your_username>\Anaconda3. (Mac): /Users/<your_username>/Anaconda3.

Does zsh work with Python?

Zsh is an implementation of the shell concept that is frequently used during Python software development as part of a programmer's development environment.


2 Answers

Altough I cannot test it on a Mac, (I have a Linux Zsh installed) this should work for you as well: Just execute

/(your conda installation path)/bin/conda init zsh 

and restart your zsh shell. The init command will change your ~/.zshrc file accordingly, setting your PATH correctly and slightly change the PS1 (which is was most answers here do manually...).

like image 134
Sebastian Thees Avatar answered Oct 05 '22 03:10

Sebastian Thees


I had a similar issue.

I checked in my .profile, .bashrc, and .bash_profile dot files in order to find any PATH information that I could copy over into my .zshrc file. Sure enough:

# added by Miniconda3 4.2.12 installer export PATH="/Users/username/miniconda3/bin:$PATH" 

After running source ~/.zshrc with those lines added, I could fire up my jupyter notebook server.

like image 20
Jonathan Wheeler Avatar answered Oct 05 '22 04:10

Jonathan Wheeler