linux下conda未安装的解决方法(离线安装linux下的conda)

第一部分:问题描述

第二部分:解决方法

(1)复制下载anaconda地址

https://repo.anaconda.com/archive/

找到你想要的,然后下载

例如我复制的是23.7.2这个版本:

(2)安装

上传到服务器,然后进入该目录:

复制代码
cd /home/pr3022206045/conda/

运行该脚本:

复制代码
bash Anaconda3-2023.07-2-Linux-x86_64.sh

安装过程中:

  • 按 Enter 阅读许可协议

  • 输入 yes 接受许可

  • 按 Enter 确认安装路径

  • 输入 yes 初始化 Conda

具体如下:

安装完成如下:

(3)设置环境变量

复制代码
export PATH="/home/pr3022206045/anaconda3/bin:$PATH"

(4)查看conda版本

复制代码
conda --version

第三部分:配置conda镜像源(可选)

复制代码
conda config --set show_channel_urls true

conda config --add default_channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
conda config --add default_channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
conda config --add default_channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2

conda config --add custom_channels.conda-forge https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
conda config --add custom_channels.msys2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
conda config --add custom_channels.bioconda https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
conda config --add custom_channels.menpo https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
conda config --add custom_channels.pytorch https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
conda config --add custom_channels.pytorch-lts https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
conda config --add custom_channels.simpleitk https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
conda config --add custom_channels.deepmodeling https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

第四部分:重新创建环境

复制代码
# 现在可以创建你的环境了
conda create --name LORA+SAM5_cifar10 python=3.9.6
相关推荐
我命由我123456 小时前
Linux - Linux/POSIX 路径斜杠折叠规则
linux·运维·服务器·android studio·android jetpack·android-studio·android runtime
姚不倒6 小时前
Nginx 反向代理:5 种负载均衡策略与实战
运维·nginx·负载均衡
xx~t6 小时前
嵌入式——Linux软件编程——网络1
linux·c语言·网络·vscode·网络协议
Uncertainty!!7 小时前
Linux 主机无法完成校园网认证排查记录:从 DHCP、ARP 到 Portal 认证流程分析
linux·运维·服务器
神威难绷泪7 小时前
Linux消息队列 & 共享内存 笔记
linux·消息队列·共享内存
其实防守也摸鱼7 小时前
权限提升与横向移动:从内网渗透到域控的完整技术图谱
运维·服务器·数据库·安全·github·copilot·渗透
代码方舟7 小时前
零信任架构实战:基于天远车辆估值构建自动化二手车评估网关
运维·人工智能·架构·自动化
bgy66667 小时前
从零上手 Docker,容器技术完整入门指南
运维·docker·容器
mounter6257 小时前
突破零停机演进:Linux 内核 Live Update Orchestrator (LUO) 架构设计与热升级演进
linux·服务器·linux kernel·kernel·kho·luo