Linux / Ubuntu 18.04 / Ubuntu 20.04 Anaconda

Install/Use Anaconda on Ubuntu

The tested environment is ubuntu 18.04. It is
recommended to read through the link (the layout is clearer) The installation and use of Anaconda under ubuntu

Install Anaconda and add environment variables

1 .bash Anaconda.sh(bash is the running command, .sh file is the installation package of conda)
2. sudo gedit ~/.bashrc(open with gedit text editor)
3. Enter at the end of the opened text export PATH="/home/zeng/anaconda3/bin:$PATH"(the path in double quotes is your own path -----/ home/zeng/anaconda3/bin—>>You need to change it according to your actual installation path)
4. source ~/.bashrc(Update the bashrc file)
5. Enter conda
6. Finish!

Use of conda

1. Install a different python environment through anaconda to create a python3.8 environment named env_name, you can execute the command: conda create -n [env_name] python=3.8
2. View all the created python environment commands in anaconda: conda env list
3. Activate the specific environment command: source/conda activate [env_name]
4. Exit the environment Command: source/conda deactivate [env_name]
5. Command to delete a specific environment: conda remove -n [env_name] --all
6. Command to view environment information:conda info -e

I hope to like it if it is helpful! Thank you

Guess you like

Origin blog.csdn.net/Leomn_J/article/details/111661309