Variable path issue : conda command not found

Solution 1:

Try adding below line to your .bashrc file

export PATH=~/anaconda3/bin:$PATH

then try:

conda --version

to see version

Solution 2:

Lets fix it like this:

  1. Move it out of /root/ with:

    sudo mv /root/anaconda3 /home/$USER
    
  2. Add this to /home/ahmed/.bashrcplease don't use 'sudo' here simple do nano /home/$USER/.bashrc:

    # Anaconda3
    export PATH="/home/ahmed/anaconda2/bin:$PATH"
    
  3. Source the .bashrc file with:

    source /home/ahmed/.bashrc
    
  4. Now delete the entry [export PATH="/root/anaconda3/bin"] in /root/.bashrc with nano editor or with the editor you used before

  5. Open new terminal and check