Tuesday, September 21, 2021

Anaconda Setup on Ubuntu for the First Time



First time Anaconda setup is done using the following commands:

1. 
~/Downloads$ ls -l
total 712608
-rwxrwxrwx 1 ashi ashi 570853747 Sep 21 12:43 Anaconda3-2021.05-Linux-x86_64.sh

2. 
$ chmod 777 Anaconda3-2021.05-Linux-x86_64.sh

3. 
~/Downloads$ ./Anaconda3-2021.05-Linux-x86_64.sh 

4. 
$ cd ~/anaconda3/bin

5. 
~/anaconda3/bin$ ./conda init bash 

no change     /home/ashi/anaconda3/condabin/conda
no change     /home/ashi/anaconda3/bin/conda
no change     /home/ashi/anaconda3/bin/conda-env
no change     /home/ashi/anaconda3/bin/activate
no change     /home/ashi/anaconda3/bin/deactivate
no change     /home/ashi/anaconda3/etc/profile.d/conda.sh
no change     /home/ashi/anaconda3/etc/fish/conf.d/conda.fish
no change     /home/ashi/anaconda3/shell/condabin/Conda.psm1
no change     /home/ashi/anaconda3/shell/condabin/conda-hook.ps1
no change     /home/ashi/anaconda3/lib/python3.8/site-packages/xontrib/conda.xsh
no change     /home/ashi/anaconda3/etc/profile.d/conda.csh
modified      /home/ashi/.bashrc

==> For changes to take effect, close and re-open your current shell. <== 

CHANGES AUTOMATICALLY PUSHED IN THE FILE: /home/ashi/.bashrc
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/ashi/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/home/ashi/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/home/ashi/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/home/ashi/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<


~/anaconda3/bin$ ./conda activate base

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run

    $ conda init <SHELL_NAME>

Currently supported shells are:
    - bash
    - fish
    - tcsh
    - xonsh
    - zsh
    - powershell

See 'conda init --help' for more information and options.

IMPORTANT: You may need to close and restart your shell after running 'conda init'. 

6.
~/anaconda3/bin$ bash

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

(base) ~/anaconda3/bin$
Tags: Technology,Anaconda,Python,

No comments:

Post a Comment