ubuntu 不同系统架构(aarch64\arm64\x86_64)安装miniconda以及配置pip镜像

查看系统架构

bash 复制代码
uname -a

如果显示是aarch64,属于arm64架构

2 安装miniconda

bash 复制代码
# x86------64架构
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
# 适用aarch64架构arm64
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh -O miniconda.sh

bash Miniconda3-latest-Linux-x86_64.sh -b -p ~/miniconda3  # -b 为batch模式,-p 指定安装路径到用户home
echo 'export PATH="$HOME/miniconda3/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

初始化Conda(以启用conda activate命令):

bash 复制代码
conda init
source ~/.bashrc  # 重新加载shell配置,使conda init生效

接受Conda服务条款(针对默认频道):

bash 复制代码
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r

创建conda环境。

bash 复制代码
conda create -n isaaclab python=3.11 -y
conda activate isaaclab

3 配置pip镜像

配置pip镜像:首先创建~/.pip目录(如果不存在),然后创建pip.conf文件并写入内容。避免使用vim编辑时因目录不存在导致的E212错误。

bash 复制代码
mkdir -p ~/.pip  # 创建目录
cat << EOF > ~/.pip/pip.conf
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
extra-index-url =
    https://pypi.nvidia.com
timeout = 60
EOF

如果需要手动编辑,可使用:

bash 复制代码
vim ~/.pip/pip.conf  # 编辑后,按:wq保存。如果vim被挂起(Stopped),使用fg恢复前台,或避免按Ctrl+Z。
相关推荐
未济3 天前
linux 配置环境变量
linux
傲世仙尊3 天前
目录即文件-Ext文件系统收尾篇
linux·c语言
_艾伦 耶格尔.4 天前
进程间通信
linux
Liuqy-054 天前
Linux IO编程——静态库、动态库
linux
彧azz4 天前
Linux 环境下 Redis 学习总结:数据类型、持久化、锁、事务、主从与缓存问题
linux·redis·笔记·学习·面试
-梅4 天前
linux(8) 软硬链接
linux·运维·服务器
AIgorithmGEEK4 天前
[Linux]线程三部曲(上):一个执行流的诞生——从操作系统一路拆到 pthread_create
linux·线程·pid
琥珀色糖4 天前
SimlpeHttp
linux·服务器
qeen874 天前
【Linux】操作系统之进程介绍(二)
linux·笔记·学习·进程
Zenova EdgeOS4 天前
Linux ss 工业边缘网络分析实战
linux·python·边缘计算·工业网关