Skip to content

Instantly share code, notes, and snippets.

@AdrianBenson
Last active April 24, 2022 15:14
Show Gist options
  • Save AdrianBenson/91cf2597e2ea301708817542f0956bc9 to your computer and use it in GitHub Desktop.
Save AdrianBenson/91cf2597e2ea301708817542f0956bc9 to your computer and use it in GitHub Desktop.
Install miniforge

Uninstall

check where conda files are installed

conda config --show root_prefix pkgs_dirs
conda config --show-sources

Now delete those directories, e.g. rm -rf ~/anaconda3 ~/.conda/pkgs

Edit enviroment config files: ~/.profile ~/.bashrc ~/.bash_profile and remove all conda related stuff

NB. you will probably have only one of .profile or bash_profile - just edit the one you have E.G. My install only has conda bits in .bashrc and is clearly marked with # >>> conda initialize >>>

Now logout and login to ensure environmnet settings are cleared

INSTALL MINIFORGE

Get Miniforge at https://docs.conda.io/en/latest/miniconda.html

bash Miniconda3-latest-Linux-x86_64.sh
. ~/.bashrc

This bit is VERY important

  • stops conda being activated on login
  • this can cause many problems
conda config --set auto_activate_base false
conda config --set channel_priority strict
conda init

 ~/.bashrc
conda activate base
conda update conda
conda update --all

you are now good to go

KEEP BASE CLEAN!\

The job of base is to mange your environmnets, so

1 never install any extra packages in base 2 base should only ever point to the main anaconda repositories

CREATING VIRTUALENVS

NOTE: do not create environments unless

  • no envs are activated or
  • base is the active env

create a "std" environment

conda create --name std conda activate std

create an environment with a different python base version

conda create --name py35 python=3.5

CLEANUP

conda clean -y --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment