Can I remove the miniconda3 library?
Yes, you can remove the library.
Why miniconda3 is in /opt/ instead of ~/miniconda3/?
I don't know why, but the miniconda3 is in the /opt/miniconda3.
You may uninstall miniconda3 with the following commands:
cd /; rm -rf ~/.condarc ~/.conda ~/.continuumcd optsudo rm -rf miniconda3- Open your bash or zsh rc file to remove miniconda from your path variable.
I used zsh, so I open -e ~/.zshrc to delete the context:
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/Users/yilin/opt/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
\eval "$__conda_setup"
else
if [ -f "/Users/yilin/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/yilin/opt/anaconda3/etc/profile.d/conda.sh"
CONDA_CHANGEPS1=false conda activate base
else
\export PATH="/Users/yilin/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda init <<<
Answer from Nancy Chen on Stack OverflowVideos
Where is Anaconda installed on a Mac?
How to check if Anaconda is installed or not?
In order to uninstall miniconda, simply remove the miniconda folder,
rm -r ~/miniconda/
As for avoiding conflicts between different Python environments, you can use virtual environments. In particular, with Miniconda, the following workflow could be used,
$ wget https://repo.continuum.io/miniconda/Miniconda3-3.7.0-Linux-x86_64.sh -O ~/miniconda.sh
$ bash miniconda
$ conda env remove --yes -n new_env # remove the environement new_env if it exists (optional)
$ conda create --yes -n new_env pip numpy pandas scipy matplotlib scikit-learn nltk ipython-notebook seaborn python=2
$ activate new_env
$ # pip install modules if needed, run python scripts, etc
# everything will be installed in the new_env
# located in ~/miniconda/envs/new_env
$ deactivate
The proper way to fully uninstall conda (Anaconda / Miniconda):
Remove all conda-related files and directories using the Anaconda-Clean package
conda activate your_conda_env_name conda install anaconda-clean anaconda-clean # add `--yes` to avoid being prompted to delete each oneRemove your entire conda directory
rm -rf ~/miniconda3Remove the line which adds the conda path to the
PATHenvironment variablevi ~/.bashrc # -> Search for conda and delete the lines containing it # -> If you're not sure if the line belongs to conda, comment it instead of deleting it just to be safe source ~/.bashrcRemove the backup folder created by the the Anaconda-Clean package NOTE: Think twice before doing this, because after that you won't be able to restore anything from your old conda installation!
rm -rf ~/.anaconda_backup
Reference: Official conda documentation