Install Miniconda under Ubuntu

download

Go to the official website to download according to your local python version
https://docs.conda.io/en/latest/miniconda.html#linux-installers

My local python3.8 is
Insert image description here
then uploaded to the Ubuntu server, or downloaded directly using wget:

wget https://repo.anaconda.com/miniconda/Miniconda3-py38_23.5.2-0-Linux-x86_64.sh

2. Installation

Go to the download directory and execute:

bash Miniconda3-py38_23.5.2-0-Linux-x86_64.sh

Press the Enter key to view the agreement.
Insert image description here
Press the space bar to the bottom, enter yes and press Enter:

Insert image description here
During the installation process, it prompts the default installation path, ctrl+c to exit, and customize the installation directory. You can customize the installation path. Here, choose to install in /usr/local/miniconda3, and enter the installation directory you want to install, for example: /usr/ local/miniconda3, press Enter

Insert image description here
During installation, wait for the installation to be completed.
Insert image description here
Initialize miniconda, enter: yes, and then
Insert image description here
press Enter. The installation is completed.
Insert image description here

If you want all users to be able to use Mniconda, you need to modify the /etc/profile file and add the following code:

export PATH=/usr/local/miniconda3/bin:$PATH

Then restart the host

After restarting the host, you can use conda list to view the packages of the current environment:

Insert image description here
Try creating a virtual environment:
conda create --name test python=3.8

Then enter the virtual environment:

conda activate test

For other commands, please refer to my other article:
https://blog.csdn.net/s_daqing/article/details/117846862

Guess you like

Origin blog.csdn.net/s_daqing/article/details/131738185