Rapidly install Miniconda in Ubuntu
Introduction
Miniconda
is a lightweight version of Anaconda
that allows you to create isolated environments for different projects. This post will guide you through the process of installing Miniconda
in Ubuntu.
Installation
sudo apt update
sudo apt install -y curl
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash ./Miniconda3-latest-Linux-x86_64.sh
After running the above commands, you will be prompted to accept the license agreement.
- Type
yes
and pressEnter
to continue the installation. You will also be prompted to choose the installation location. - Press
Enter
to installMiniconda
in the default location. - Type
yes
and pressEnter
to initializeMiniconda
.
Source the .bashrc
or .zshrc
file to activate Miniconda
.
source ~/.bashrc # or source ~/.zshrc
Basic Commands
-
Create a new environment:
# Replace <ENV_NAME> with a name for your environment # Replace <PACKAGE> with your desired package # Replace <VERSION> with your desired version of Python conda create -n <ENV_NAME> python=<VERSION> <PACKAGE>=<VERSION>
-
Activate/deactivate an environment:
# Replace <ENV_NAME> with the name of the environment you want to activate conda activate <ENV_NAME>
conda deactivate
-
Install a package:
# Replace <PACKAGE> with your desired package # Replace <VERSION> with your desired version of package conda install <PACKAGE>=<VERSION>
References
版权声明: 如无特别声明,本文版权归 Longbin's Tech-Blog 所有,转载请注明本文链接。
(采用 CC BY-NC-SA 4.0 许可协议进行授权)
本文标题:《 Miniconda Installation 》
本文链接:https://longbin.tech//linux/Miniconda-Installation.html
本文最后一次更新为 天前,文章中的某些内容可能已过时!