查看系统架构
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。