Install conda environment for arm/aarch64 architecture

Install anaconda

Download and install

First find an address to download conda

Tsinghua source anaconda address

You can see that conda has the following versions in different system environments.
anaconda installation packages for different system versions
To identify different domestic systems, please refer to: What are the domestic open source operating systems?

Alibaba arm/aarch64 architecture is used here.

So the download link is
https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2023.03-Linux-aarch64.sh

You can download and upload manually or use wget to download.

wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2023.03-Linux-aarch64.sh

Use wget to download here

Install

/bin/bash Anaconda3-2023.03-Linux-aarch64.sh -f -b -p /opt/conda

Installation process
I don’t know why I wasn’t asked to read the document, but I kept choosing yes.

Check whether the installation is successful (you may not have added conda to the environment variable)

conda -V

Verify using conda -V

There may be an environment variable problem

If the following situation occurs

[root@XXXX ~]# conda -V
-bash: conda: command not found

No environment variables added
You need to add conda to the environment variables.

Add conda to environment variables

Open the file /etc/profile

vim /etc/profile

Add the following statement

# conda,这是把conda的环境加入系统的环境变量  
export PATH=/opt/conda/bin:$PATH

# 这一步是系统进入conda的默认base环境
source activate


# 下面6行内容先不要看,暂时没搞明白~~~~~~~~~~~~~~~~~~~~
# conda,这是把conda的环境加入系统的环境变量  
export conda=/root/miniconda3  
export PATH=$PATH:$conda/bin

alias liuzhenPython='/home/riki/anaconda3/bin/python'
export PATH="/home/riki/anaconda3/bin:$PATH"

Then execute the statement

source /etc/profile

After performing the above steps, you can use the conda command on linux

There is an option to add the installation package directly in the window environment. During the anaconda installation process, you will be prompted whether to add the environment variable to the path. Just click it.

Add Tsinghua Source

View current conda configuration

conda config --show channels

Set channel

conda config --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/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/

Set search to display channel address

conda config --set show_channel_urls yes

conda settings Tsinghua source_mjiansun's blog-CSDN blog_conda Tsinghua source

Remove default source

conda config --remove channels defaults

Modify conda config (add/delete channel)_Proper Blog-CSDN Blog_conda config

Commonly used conda commands

Common commands in conda environment

Set up python environment

Common commands for python installation libraries

Guess you like

Origin blog.csdn.net/aiaidexiaji/article/details/129876106