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。
相关推荐
chlk1231 天前
Linux文件权限完全图解:读懂 ls -l 和 chmod 755 背后的秘密
linux·操作系统
舒一笑1 天前
Ubuntu系统安装CodeX出现问题
linux·后端
改一下配置文件1 天前
Ubuntu24.04安装NVIDIA驱动完整指南(含Secure Boot解决方案)
linux
深紫色的三北六号2 天前
Linux 服务器磁盘扩容与目录迁移:rsync + bind mount 实现服务无感迁移(无需修改配置)
linux·扩容·服务迁移
SudosuBash2 天前
[CS:APP 3e] 关于对 第 12 章 读/写者的一点思考和题解 (作业 12.19,12.20,12.21)
linux·并发·操作系统(os)
哈基咪怎么可能是AI2 天前
为什么我就想要「线性历史 + Signed Commits」GitHub 却把我当猴耍 🤬🎙️
linux·github
十日十行3 天前
Linux和window共享文件夹
linux
木心月转码ing3 天前
WSL+Cpp开发环境配置
linux
崔小汤呀5 天前
最全的docker安装笔记,包含CentOS和Ubuntu
linux·后端
何中应5 天前
vi编辑器使用
linux·后端·操作系统