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。
相关推荐
orion5717 小时前
Missing Semester Class1:course overview and introduction of shell
linux
用户120487221611 天前
Linux驱动编译与加载
linux·嵌入式
用户805533698031 天前
Input 子系统架构:Core、Handler、Driver 三层是怎么协作的
linux·嵌入式
用户805533698031 天前
RK-Forge外设系列开篇 - 把板子从「能启动」变成「能用」:Ethernet/SPI/MMC 三个纯接线外设
linux·github·嵌入式
七歌杜金房2 天前
我终于又有了自己的 Linux 电脑
linux·debian·mac
tntxia3 天前
linux curl命令详解_curl详解
linux
扛枪的书生3 天前
Linux 网络管理器用法速查
linux
顺风尿一寸3 天前
Java Socket 内核之旅:从 SocketChannel.read() 到 tcp_recvmsg 与 epoll 的完整调用链路
linux
XIAOHEZIcode3 天前
Ubuntu 终端美化全栈指南:Bash 到 Kitty 踩坑实录
linux·ubuntu·命令行
唐青枫3 天前
别再只会用 cron:Linux systemd Timer 定时任务实战详解
linux