Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the specific steps for Linux to install Conda

Shulou Source: shulou.com Published: 2022-06-01 19:44:47 10月04日 Update

This article analyzes "what are the specific steps for Linux to install Conda". The content is detailed and easy to understand, and friends who are interested in "what are the specific steps for Linux to install Conda" can follow the editor's train of thought to read it in depth. I hope it will be helpful to everyone after reading. Let's follow the editor to learn more about "what are the specific steps for Linux to install Conda".

Conda is an open source package management system and environmental management system for installing multiple versions of software packages and their dependencies and easily switching between them.

Specific steps for Linux to install Conda

Linux install conda specific steps: 1. Download wget-c https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh 1 with the wget command

2. When the installation command chmod 777 Miniconda3-latest-Linux-x86_64.sh sh Miniconda3-latest-Linux-x86_64.sh 12 asks if you want to initialize Miniconda3, select "no"

3. Verify that conda is installed successfully and enter the conda command. If the output is not successful, use the vim tool in the following figure, edit the .bashrc file, and enter the installation directory of miniconda3 in the lowest line as the environment variable, which is the same as the installation directory saved above.

Export PATH= "/ root/miniconda3/bin:" $PATH 1 enter ESC,:, wq save edit input commands to make the .bashrc file effective

Source ~ / .bashrc 1 enter the conda command. If it returns normally, it means that conda is installed successfully.

4. Add the mirror source conda config of Tsinghua University-- add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config-- add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ conda config-- add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ conda config-- add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/ conda config-- Set show_channel_urls yes conda config-get channels 123456

5. The environment management command can use the following command to view the list of existing environments. * indicates the current environment, and base represents the default environment.

Conda env list 1 creates the environment with the command "conda create-n environment name python= version number", where you create a virtual environment with a python version number of 3.7.1, wait a little, and enter "y" in the process.

Conda create-n test python=3.7.1 1 to view the list of environments, the new environment has been created

Conda env list 1 activates the environment. By default, it is in the base environment. To enter other environments, you need to use source activate to manually switch. To exit the current environment, use source deactivate, and return to the base environment by default.

Here the prompt command "source deactivate" is obsolete. Use "conda deactivate".

6. After entering the environment to install the dependent package, you can use the following command to install the dependent package, using the configured Tsinghua source. Here, take the "opencv-python" package as an example. Due to the use of the mirror source of Tsinghua University, the download speed is very fast.

Pip install-I https://pypi.tuna.tsinghua.edu.cn/simple opencv-python 17. Switching back to the default source of conda may be a bit slow to access, but it's better than no access at all. Conda config-remove-key channels on Linux installation Conda specific steps are shared here, I hope that the above content can make you improve. If you want to learn more knowledge, please pay more attention to the editor's updates. Thank you for following the website!

Tags: Environment commands steps input success version Tsinghua Management content name University File Directory knowledge Management system system follow Software package Image Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei NVidia Xiaomi OPPO Reno Shulou Information