选择安装版本:
可以选择安装 Anaconda 或 Miniconda,Anaconda 包含了大量的科学计算库和工具,而 Miniconda 仅包含 Conda 包管理器及其依赖,体积更小.
下载安装脚本:如果选择安装 Anaconda,可使用curl命令下载适合 arm 架构的 Anaconda 安装脚本,如curl -o https://repo.anaconda.com/archive/anaconda3-2023.09-0-linux-aarch64.sh;若选择 Miniconda,则下载对应的 Miniconda 安装脚本,如curl -o https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh.
我选择安装Miniconda。在/userdata/下面新建下载目录,并下载好文件:
2、下载好后,执行bash Miniconda3-latest-Linux-aarch64.sh :
按回车键继续,等待阅读完协议后,输入yes同意协议:
3、此时询问是否同意安装到指定目录,输入回车键同意:
/root/miniconda3 - Press ENTER to confirm the location - Press CTRL-C to abort the installation - Or specify a different location below
4、最后询问是同意在启动时初始化基础环境,我这里先择同意:
5、检查是否安装成功:
root@myd-lr3576x-debian:/userdata/myenv# /root/miniconda3/bin/conda -V conda 24.9.2
6、创建虚拟环境:
root@myd-lr3576x-debian:/userdata/myenv# /root/miniconda3/bin/conda create --name myenv python=3.9 Channels: - defaults Platform: linux-aarch64 Collecting package metadata (repodata.json): done Solving environment: done
7、激活虚拟环境:
root@myd-lr3576x-debian:/userdata/myenv# /root/miniconda3/bin/conda create --name myenv python=3.9 Channels: - defaults Platform: linux-aarch64 Collecting package metadata (repodata.json): done Solving environment: done ## Package Plan ## environment location: /root/miniconda3/envs/myenv added / updated specs: - python=3.9 The following packages will be downloaded: package | build ---------------------------|----------------- ca-certificates-2024.11.26 | hd43f75c_0 131 KB pip-24.2 | py39hd43f75c_0 2.2 MB python-3.9.21 | h4bb2201_1 24.6 MB setuptools-75.1.0 | py39hd43f75c_0 1.6 MB wheel-0.44.0 | py39hd43f75c_0 111 KB ------------------------------------------------------------ Total: 28.7 MB The following NEW packages will be INSTALLED: _libgcc_mutex pkgs/main/linux-aarch64::_libgcc_mutex-0.1-main _openmp_mutex pkgs/main/linux-aarch64::_openmp_mutex-5.1-51_gnu ca-certificates pkgs/main/linux-aarch64::ca-certificates-2024.11.26-hd43f75c_0 ld_impl_linux-aar~ pkgs/main/linux-aarch64::ld_impl_linux-aarch64-2.40-h48e3ba3_0 libffi pkgs/main/linux-aarch64::libffi-3.4.4-h419075a_1 libgcc-ng pkgs/main/linux-aarch64::libgcc-ng-11.2.0-h1234567_1 libgomp pkgs/main/linux-aarch64::libgomp-11.2.0-h1234567_1 libstdcxx-ng pkgs/main/linux-aarch64::libstdcxx-ng-11.2.0-h1234567_1 ncurses pkgs/main/linux-aarch64::ncurses-6.4-h419075a_0 openssl pkgs/main/linux-aarch64::openssl-3.0.15-h998d150_0 pip pkgs/main/linux-aarch64::pip-24.2-py39hd43f75c_0 python pkgs/main/linux-aarch64::python-3.9.21-h4bb2201_1 readline pkgs/main/linux-aarch64::readline-8.2-h998d150_0 setuptools pkgs/main/linux-aarch64::setuptools-75.1.0-py39hd43f75c_0 sqlite pkgs/main/linux-aarch64::sqlite-3.45.3-h998d150_0 tk pkgs/main/linux-aarch64::tk-8.6.14-h987d8db_0 tzdata pkgs/main/noarch::tzdata-2024b-h04d1e81_0 wheel pkgs/main/linux-aarch64::wheel-0.44.0-py39hd43f75c_0 xz pkgs/main/linux-aarch64::xz-5.4.6-h998d150_1 zlib pkgs/main/linux-aarch64::zlib-1.2.13-h998d150_1 Proceed ([y]/n)? y Downloading and Extracting Packages: Preparing transaction: done Verifying transaction: done Executing transaction: done # # To activate this environment, use # # $ conda activate myenv # # To deactivate an active environment, use # # $ conda deactivate
8、进入虚拟环境:
(base) root@myd-lr3576x-debian:~# conda activate myenv (myenv) root@myd-lr3576x-debian:~# cd /userdata/myenv/
【总结】
到此基于米尔RK3576的miniconda环境就安装好了。