How to start Conda?

How to run conda on a Linux machine?

I installed Anaconda and I can run Python, so I assume I installed it correctly.

Following this tutorial: http://docs.continuum.io/conda/intro.html , I'm trying to install Python33, so I copy and paste the following line into the console:

conda create -n py33 python=3.3 anaconda 

However, this gives me an error:

 -bash: conda: command not found 

What do I need to do to run Conda?

+195
python conda anaconda
Sep 07 '13 at 17:20
source share
33 answers
  • one
  • 2

You can try this:

for anaconda 2:

 export PATH=~/anaconda2/bin:$PATH 

for anaconda 3:

 export PATH=~/anaconda3/bin:$PATH 

for anaconda 4:

Use the hint of Anaconda

and then

 conda --version 

to confirm that it worked. Export PATH = ~ / anaconda3 / bin: $ PATH works, but stops when you exit the terminal to change the order in which you need to run sudo nano ~ / .bashrc and then copy the path to the file and save it after you activate the changes using the source .bashrc.

check with conda to install anaconda-navigator, if it is not installed, follow the anaconda installation instructions again

follow along with this video https://youtu.be/Pr25JlaXhpc

+355
Mar 01 '16 at 8:22
source share

It turns out I did not set the path.

To do this, I first had to edit the .bash_profile file (I downloaded it to my local desktop to do this, I don't know how to edit a text file from linux)

Then add this to .bash_profile:

 PATH=$PATH:$HOME/anaconda/bin 
+74
Sep 07 '13 at 17:26
source share

This information is current from today, August 10, 2016. Below are the exact steps I took to fix this using the methods described above. I did not see any message: export PATH=$PATH:$HOME/anaconda/bin (you need to add export to the beginning of the line).

Here, step by step:

For those working on the same issue when using oh-my-zsh, you need to do the following:

-Open your .zshrc in your terminal. I use iTerm 2 and have Sublime Text 3 as the default text editor:

subl ~/.zshrc

- When the file opens in a text editor, scroll to the bottom and add:

export PATH=$PATH:$HOME/anaconda/bin

-Save the file and then close it.

-Close your terminal, then restart it.

-Learn more on your terminal, enter:

conda --v

Then you should see the version of conda installed on your screen.




If you use zsh, then after that your terminal can show you zsh: command not found: rvm-prompt .

Decision:

  • add alias rvm-prompt=$HOME/.rvm/bin/rvm-prompt to the .zshrc file.
  • type source .zshrc .

Then zsh: command not found: rvm-prompt will disappear.

+28
Aug 11 '16 at 0:11
source share

If you installed Anaconda but cannot download the correct versions of python and ipython, or if you see the conda command: the command was not found when trying to use conda, this could be a problem with your PATH environment variable. At the command prompt, type:

 export PATH=~/anaconda/bin:$PATH 

This example assumes that Anaconda is set to the default location ~/anaconda .

+27
Oct 23 '14 at 9:25
source share

Edit ~ / .bash_profile, add it to it.

 PATH=$PATH:$HOME/anaconda/bin 

then run

 source ~/.bash_profile 

Hope can help you.

+18
Sep 26 '16 at 5:26
source share

My env: macOS and anaconda3

This works for me:

 $ nano ~/.bash_profile 

Add this:

 export PATH=~/anaconda3/bin:$PATH 

Exit and start:

 $ source ~/.bash_profile 

Then try:

 $ jupyter notebook 
+15
Nov 28 '17 at 15:19
source share

I am using High Sierra MAC OS and have just installed Anaconda3 using the HomeBrew command. I had a problem starting up:

  conda 

This would also give me:

 -bash: conda: command not found 

I tried running:

 export PATH=~/anaconda3/bin:$PATH 

but this requires an ALL path. So here are the right steps:

 $ nano ~/.bash_profile 

Now export the WHOLE path, in my case it was:

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

Quit and run:

 $ source ~/.bash_profile 

Then try:

 $ conda 

this will output:

  $ conda --version conda 4.4.10 
+14
Apr 19 '18 at 15:46
source share

If you installed Anaconda and definitely said yes :

 Do you wish the installer to prepend the Anaconda install location to PATH in your /home/name/.bashrc ? [yes¦no] 

then you may just need to restart the terminal window. The change will not take effect until you (1) close and open a new window or (2) open and start working in a new window

Basically, open a new console window and see if it works now.

+7
Sep 07 '16 at 20:59
source share

For Windows:

Recently, Anaconda (version 4.4.0) has changed some directories. You can find "conda" in Anaconda3 / Scripts , instead of Anaconda3 / bin.

+7
Aug 14 '17 at 22:48 on
source share

If you just installed anaconda and got this error, then I think you forgot to run this command:

  • source ~/.bashrc

This will allow you to use anaconda in the terminal.

It may seem simple, but many (including me) make this mistake.

If the error still persists, you should check to see if the anaconda location is added to the PATH on your system.

Once you add it, everything will be alright

+7
Oct 20 '18 at 1:18
source share

Use conda init

As pointed out in another answer , manually adding Conda to $PATH no longer recommended with v4.4.0 (see release notes ). In addition, starting with Conda v4.6, new functionality has been introduced to control shell initialization using the conda init command. Therefore, the updated recommendation is to run

 ./anaconda3/bin/conda init --dry-run -vv 

First check the changes he makes. If you do not already have a section managed by Conda in the shell startup command file (for example, .bashrc ), then this should look like inserting some new lines directly. In this case, start the launch.

 ./anaconda3/bin/conda init -vv 

If this is not such a simple insertion, I would recommend that you first clear all previous Conda sections from $PATH and the corresponding shell initialization files (e.g. bashrc ), and then run the commands as described above.

You must run a new shell or initialization file (for example, source.bashrc ) for the changes to take effect.




Potential automatic cleaning

Note that in Conda v4.6.9, the --reverse flag was also introduced to remove changes from conda init . However, I did not check this, and running conda init --reverse --dry-run -vv on my system shows that it will not change anything, that is, it does not look reliable.

+6
Apr 05 '19 at 0:10
source share

This is mainly because when we install Anaconda at the end, it adds the anaconda path to the PATH variable in the .bashrc file. So we just need to restart the terminal or just do

 source ~/.bashrc 

if still this does not work, then follow these commands.

 cat >> ~/.bashrc 

paste the below command for anaconda3

 export PATH=~/anaconda3/bin:$PATH 

press Enter, then Ctrl + D

 source ~/.bashrc 
+5
Apr 04 '18 at 5:58
source share

If you installed anaconda but cannot execute the conda command from the terminal, this means that the path is probably not set, try:

 export PATH=~/anaconda/bin:$PATH 

See this link .

+3
Mar 12 '15 at 4:36
source share

Answer for

  • Anaconda3 5.2.0 installer
  • macOS HighSierra
  • ZH



  1. Unfortunately, the installer only places the PATH definition in .bash_profile , but not in the .zshrc configuration.
  2. Contrary to the answers given, it is (not necessary) set to ~/anaconda3/ , and not to /anaconda3/ .



Therefore, the PATH definition in .zshrc should be as follows:

 ... # Anaconda3 export PATH="/anaconda3/bin:$PATH" ... 
+3
Aug 03 '18 at 10:25
source share

Run

 cat ~/.bash_profile 

to check if anaconda exists. If not, you should add your path there. If conda copies the entire line that you see where Anaconda is, from "export" to the end of the line. eg:

 export PATH=~/anaconda3/bin:$PATH 

Run this in your terminal. Then run

 conda --version 

to make sure it is exported and running!

+2
Jun 16 '17 at 0:38
source share

System: macOS

I installed Anaconda first and it worked fine. Then I installed iTerm2, and when I typed Python iTerm2 gave me Python by default. Here's how to find your Anaconda Python:

  • Open the .zshrc file. For example, vim ~/.zshrc

  • Then add export PATH="/Users/yourusername/anaconda2/bin:$PATH" to the last line of the file. Please note that you need to replace yourusername with your username and make sure you have anaconda2. A simple way is to copy this line from ~/.bash_profile

  • Save the file, close it, restart the terminal, and now Anaconda Python should return.

+2
Oct 10 '17 at 1:29 on
source share

If you just installed MiniConda or Anaconda, make sure you restart your terminal.

Based on this, I mean to close and open my terminal, and then try the conda list to check your installation

It worked for me !!

+2
Dec 28 '17 at 5:43 on
source share

I also ran into the same problem, this might be the easiest solution

 source anaconda/bin/activate 

for use anaconda2

 source anaconda2/bin/activate 

depending on the directory name, then run your command, i.e. conda --create

+2
Jun 13 '18 at 14:35
source share

Open a terminal and enter the following command to add anaconda to your environment path.

for anaconda 2:

 export PATH=~/anaconda2/bin:$PATH 

for anaconda 3:

 export PATH=~/anaconda3/bin:$PATH 

Then, to check the conda version, just type

 conda --version 

Create an environment using the following command:

 conda create --name myenv 

Activate the source using,

 source activate myenv 

Then your anaconda IDE is ready !!!

+2
Aug 18 '18 at 8:25
source share

Temporary solution:

 $anaconda/bin/conda create -n py33 python=3.3 anaconda 
+1
Jan 17 '16 at 23:17
source share

I am setting up a virtual machine running Ubuntu. I have anaconda 3 installed in the Home folder. When I entered "conda" in the terminal, I got the error "conda: command not found" too.

Entering the code below into the terminal worked for me ...

 export PATH=$PATH:$HOME/anaconda3/bin 

to check this, I typed:

 conda --version 

which answered with the version number.

+1
Jun 22 '17 at 12:12
source share

You need to put Anaconda.sh in your / home / and then run it to install. After that, you can run export PATH=~/anaconda3/bin:$PATH . Note: do not run Anaconda.sh in download / directily !!!!!

+1
Nov 21 '17 at 8:39
source share

First check the location of anaconda, for me I installed anaconda3 in the / directory to which I have access /anaconda3

Then in your terminal type export PATH="<base location>/anaconda3/bin:$PATH" for me it's export PATH="/anaconda3/bin:$PATH" .

Finally, the input source $/anaconda3/bin/activate . Just change your location for you.

Now you can try the conda list for testing.

Also visit the installation guide

+1
Mar 11 '18 at 3:21
source share

1. Check where you installed Anaconda . In my case, it looks like /home/nour/anaconda3/bin

  1. Open the .bashrc . For example, $ gedit.bashrc

3. Add the line export PATH =/home/nour/anaconda3/bin:$PATH to the end of the file and save.

  1. Open the terminal again. Type conda --version

NOTE. Make sure the path in line No. 1 and line number 3 should be the same. In my case /home/nour/anaconda3/bin .

+1
Mar 11 '18 at 18:26
source share

Edit bashrc in Ubuntu

 $ /usr/bin/vim ~/.bashrc 

enter PATH=$PATH:$HOME/anaconda3/bin Press Esc and :wq to save the bashrc file and exit vim, enter the image description here

then

 $ export PATH=~/anaconda3/bin:$PATH 

and enter $ source ~/.bashrc Now to confirm the conda type setting

 $ conda --version 
+1
Jul 31 '18 at 18:05
source share

If you installed Anaconda with Visual Studio 2017 for Windows, the conda executable is located along this path or similar.

In my case, the path is as follows: C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\Scripts

Steps to add it to your path:

  • On the Windows desktop, right-click My Computer.
  • From the pop-up menu, select "Properties."
  • In the "System Properties" window, go to the "Advanced" tab and click "Environment Variables".
  • In the System Variables window, highlight Path and click Modify.
  • Add your path and restart your cmd.

You can run conda

Good coding!

+1
Oct 09 '18 at 16:39
source share

Using the export PATH= strategy with conda activate will result in a warning message for conda> = 4.4.

The recommended way (see this release note and this post ) to do is to delete the export PATH=... and instead add the line to your .bashrc ( .bash_profile ) line:

 . ~/anaconda2/etc/profile.d/conda.sh 

Also, if you want conda to be activated by default, add:

 conda activate 
+1
Feb 16 '19 at 17:48
source share

In my case, conda Path was installed correctly (in .bashrc) by installing conda bash. But to do this, I had to provide executables for the files in the bin subfolder in chmod +x * .

My system info:

conda 4.2.9

Operating System: Debian GNU / Linux 8 (jessie)

Kernel: Linux 3.16.0-4-amd64

Architecture: x86-64

0
Dec 29 '16 at 15:21
source share

For Windows:

 PATH=%USERPROFILE%\Continuum\Anaconda4.4.0\Library\bin;%PATH% 
0
Jun 21 '17 at 18:14
source share

I had the same problem. What I did was delete the anaconda directory from the installation location and reinstall after that everything worked as I expected

0
Jan 17 '18 at 11:29
source share
  • one
  • 2



All Articles