Conda Pip - animeshtrivedi/notes GitHub Wiki

Conda packages

  • iostat : conda install conda-forge::sysstat

Upgrade the python specific environment

conda install python=3.13 
conda remove python 

List installed pip packages (and remove them)

pip freeze | xargs pip uninstall -y

https://stackoverflow.com/questions/11248073/how-do-i-remove-all-packages-installed-by-pip

list all environments

https://docs.conda.io/projects/conda/en/4.6.0/user-guide/tasks/manage-environments.html#id8

conda env list

Installing and setup

  1. Download the file: https://www.anaconda.com/download/#linux
$ wget https://repo.anaconda.com/archive/Anaconda3-2024.10-1-Linux-x86_64.sh
  1. sudo bash ./Anaconda3-2023.03-Linux-x86_64.sh
  2. Activate:
source /opt/anaconda3/bin/activate
conda init
conda create --name ssd
conda activate ssd 

https://stackoverflow.com/questions/54429210/how-do-i-prevent-conda-from-activating-the-base-environment-by-default Decative

conda config --set auto_activate_base false
conda activate 

From: https://askubuntu.com/questions/1457726/how-and-where-to-install-conda-to-be-accessible-to-all-users

Do you wish to update your shell profile to automatically initialize conda?
This will activate conda on startup and change the command prompt when activated.
If you'd prefer that conda's base environment not be activated on startup,
   run the following command when conda is activated:

conda config --set auto_activate_base false

You can undo this by running `conda init --reverse $SHELL`? [yes|no]
[no] >>> 

You have chosen to not have conda modify your shell scripts at all.
To activate conda's base environment in your current shell session:

eval "$(/opt/anaconda3/bin/conda shell.YOUR_SHELL_NAME hook)" 

To install conda's shell functions for easier access, first activate, then:

conda init

When doing conda init

The following is added to bashrc

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