Python virtual environment management tools such as venv
, virtualenv
, conda
, pipenv
, and poetry
are widely used. Each tool has its own strengths and weaknesses, and the choice depends on the user’s needs and the characteristics of the project. While it is difficult to determine exact statistics on the most commonly used tool, conda
is popular in the data science field, whereas poetry
is gaining traction for general Python projects. Since I work as a Data Scientist and AI Engineer, I plan to use conda
.
Miniconda is a software distribution that helps easily install and manage Python and related packages. It is a lightweight version of the Anaconda distribution, allowing users to install only the minimal necessary packages and add additional packages as needed later.
Key Features of Miniconda
- Lightweight Installation: Miniconda includes only the essential packages, making installation fast and simple. By default, it comes with the Conda package manager and Python.
- Flexible Package Management: With Conda, users can easily install and manage various Python packages. It supports packages for diverse fields such as data science, machine learning, and web development.
- Virtual Environment Management: Conda allows users to create and manage multiple virtual environments, enabling independent development environments for different projects.
Install Miniconda on Ubuntu
- According to the documentation (Installation methods), you need to run the following command. For more details, please refer to the official documentation.
- For reference, even if Miniconda is installed with a super account, it cannot be used in my account. I will install it under my account (jaoneol).
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash ~/Miniconda3-latest-Linux-x86_64.sh
source ~/.bashrc
1
2
3
4
5
6
| jaoneol@DESKTOP-B7GM3C5:~$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
Miniconda3-latest-Linux-x86_64.sh 100%[=======================================================================================================>] 140.94M 58.7MB/s in 2.4s
2025-02-05 22:20:49 (58.7 MB/s) - ‘Miniconda3-latest-Linux-x86_64.sh’ saved [147784736/147784736]
jaoneol@DESKTOP-B7GM3C5:~$ ls
Miniconda3-latest-Linux-x86_64.sh
|
1
2
3
4
5
6
7
8
| jaoneol@DESKTOP-B7GM3C5:~$ bash ~/Miniconda3-latest-Linux-x86_64.sh
Welcome to Miniconda3 py312_24.11.1-0
In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| 3. Intellectual Property Notice. You acknowledge that, as between You and Anaconda, Anaconda owns all right, title, and interest, including all intellectual property rights, in and to Miniconda
(R) and, with respect to third-party products distributed with or through Miniconda(R), the applicable third-party licensors own all right, title and interest, including all intellectual proper
ty rights, in and to such products.
Do you accept the license terms? [yes|no]
>>> yes
Miniconda3 will now be installed into this location:
/home/jaoneol/miniconda3
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
[/home/jaoneol/miniconda3] >>>
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
Preparing transaction: done
Executing transaction: done
installation finished.
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] >>> yes
no change /home/jaoneol/miniconda3/condabin/conda
no change /home/jaoneol/miniconda3/bin/conda
no change /home/jaoneol/miniconda3/bin/conda-env
no change /home/jaoneol/miniconda3/bin/activate
no change /home/jaoneol/miniconda3/bin/deactivate
no change /home/jaoneol/miniconda3/etc/profile.d/conda.sh
no change /home/jaoneol/miniconda3/etc/fish/conf.d/conda.fish
no change /home/jaoneol/miniconda3/shell/condabin/Conda.psm1
no change /home/jaoneol/miniconda3/shell/condabin/conda-hook.ps1
no change /home/jaoneol/miniconda3/lib/python3.12/site-packages/xontrib/conda.xsh
no change /home/jaoneol/miniconda3/etc/profile.d/conda.csh
modified /home/jaoneol/.bashrc
==> For changes to take effect, close and re-open your current shell. <==
Thank you for installing Miniconda3!
|
1
2
3
| # The `source` command is useful for running scripts while maintaining the current shell environment.
jaoneol@DESKTOP-B7GM3C5:~$ source ~/.bashrc
(base) jaoneol@DESKTOP-B7GM3C5:~$
|
1
2
3
4
5
6
7
8
9
| (base) jaoneol@DESKTOP-B7GM3C5:~$ conda --version
conda 24.11.1
(base) jaoneol@DESKTOP-B7GM3C5:~$ conda env list
# conda environments:
#
base * /home/jaoneol/miniconda3
(base) jaoneol@DESKTOP-B7GM3C5:~$
|