Look at the guide in here or follow bellow steps.
Install conda:
mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm ~/miniconda3/miniconda.shAfter installing, initialize your newly-installed Miniconda.
~/miniconda3/bin/conda init bashSetup your python:
conda create -n some_name python=3.10
conda activate some_nameYou can put conda activate some_name in your ~/.bashrc to activate it when open a new terminal.
Remove your conda environment:
conda remove -n some_name --allTo completely remove Miniconda from your Ubuntu system, including all associated configurations and files, follow these steps:
# This process installs a new Jupyter kernel named test with the display name "bird".
pip install ipykernel
sudo python -m ipykernel install --name test --display-name bird
# Location of the Installed Kernel
jupyter kernelspec list
# This command will display a list of all installed kernels along with their corresponding paths.
# test /home/your_username/.local/share/jupyter/kernels/test
# Removing the Installed Kernel
jupyter kernelspec uninstall testEnsure that no Conda environments are active by running:
conda deactivateDelete the directory where Miniconda is installed. By default, this is ~/miniconda3. Use the following command, adjusting the path if necessary:
rm -rf ~/miniconda3/Note: Replace ~/miniconda3/ with the correct path if you installed Miniconda elsewhere.
Remove Conda-Related Hidden Files and Directories
Remove hidden files and directories in your home directory that Conda uses:
rm -rf ~/.conda ~/.condarc ~/.continuumThese directories store Conda environments and settings.
Conda adds initialization code to your shell's configuration file (e.g., .bashrc). To remove these lines:
-
Open the configuration file in a text editor:
nano ~/.bashrc -
Scroll to the section managed by 'conda init', which looks like:
# >>> conda initialize >>> # !! Contents within this block are managed by 'conda init' !! __conda_setup="$('/home/username/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" if [ $? -eq 0 ]; then eval "$__conda_setup" else if [ -f "/home/username/miniconda3/etc/profile.d/conda.sh" ]; then . "/home/username/miniconda3/etc/profile.d/conda.sh" else export PATH="/home/username/miniconda3/bin:$PATH" fi fi unset __conda_setup # <<< conda initialize <<< -
Delete this entire block.
-
Save the file and exit the editor (in nano, press
CTRL+Oto save andCTRL+Xto exit). -
Apply the changes by sourcing the file:
source ~/.bashrc
Check for and remove any remaining Conda-related cache files:
rm -rf ~/.cache/condaFrom https://software-carpentry.org/lessons, below courses are offered.
For more on software engineering side, you could also attend this course: