I've installed Miniconda and have added the environment variable export PATH="/home/username/miniconda3/bin:$PATH"
to my .bachrc
and .bash_profile
but still can't run any conda commands in my terminal.
Am I missing another setup? I'm using zsh by the way.
If you're using zsh and it has not been set up to read .bashrc, you need to add the Miniconda directory to the zsh shell PATH environment variable. Add this to your .zshrc
:
export PATH="/home/username/miniconda/bin:$PATH"
Make sure to replace /home/username/miniconda
with your actual path.
Save, exit the terminal and then reopen the terminal. conda
command should work.
Maybe you need to execute "source ~/.bashrc"
If you have the PATH in your .bashrc file and are still getting
conda: command not found
Your terminal might not be looking for the bash file.
Type
bash
in the terminal to insure you are in bash and then try:
conda --version
Sometimes, if you don't restart your terminal after you have installed anaconda also, it gives this error.
Close your terminal window and restart it.
It worked for me now!
Maybe you should type add this to your .bashrc
or .zshrc
export PATH="/anaconda3/bin":$PATH
It worked for me.
Execute the following command after installing and adding to the path
source ~/.bashrc
where source
is a bash shell built-in command that executes the content of the file passed as argument, in the current shell.
It runs during boot up automatically.
I faced this issue on my mac after updating conda. Solution was to run conda mini installer on top of existing conda setup.
$ curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o ~/miniconda3.sh
$ bash ~/miniconda3.sh -bfp ~/miniconda3
On linux, you can use:
$ curl https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o ~/miniconda3.sh
$ bash ~/miniconda3.sh -bfp ~/miniconda3
For other versions, you can go to https://repo.continuum.io/miniconda/
For details check: https://github.com/conda/conda/issues/1364
Make sure that you are installing the Anaconda binary that is compatible with your kernel. I was in the same situation.Turned out I have an x64_86 CPU and was trying to install a 64 bit Power 8 installer.You can find out the same for your CPU by using the following command.It gives you a basic information about a computer's software and hardware.-
$ uname -a
https://www.anaconda.com/download/#linux
The page in the link above, displays 2 different types of 64-Bit installers -
- 64-Bit (x86) installer and
- 64-Bit (Power 8) installer.
I had the same issue. I just closed and reopened the terminal, and it worked. That was because I installed anaconda with the terminal open.
来源:https://stackoverflow.com/questions/35246386/conda-command-not-found