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
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.
Press the space bar to the bottom, enter yes and press Enter:
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
During installation, wait for the installation to be completed.
Initialize miniconda, enter: yes, and then
press Enter. The installation is completed.
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:
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