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
相关推荐
伏加特遇上西柚9 分钟前
Loki+Alloy+Grafana日志采集部署
java·linux·服务器·spring boot·grafana·prometheus
zl_dfq9 分钟前
服务器设计细节 之 【eventfd、struct stat、stat接口】
服务器
King's King12 分钟前
自动化立体仓库系统项目施工要点
运维·自动化
资源分享助手14 分钟前
三网H5小游戏战车向前冲搭建教程(Win+Linux)
linux·运维·服务器
黑白园22 分钟前
Linux i2c驱动初探(一)待补充
linux
无限进步_30 分钟前
Linux权限模型:从rwx到粘滞位
linux·运维·服务器
似是燕归来33 分钟前
WiFi 模块自动联网自带MQTT协议栈和云服务器串口透传免AT开发
服务器·esp32·wifi模块·mqtt协议
Web极客码1 小时前
什么是WHMCS?
服务器·whmcs
goyeer1 小时前
【ITIL4】- 服务价值体系
大数据·运维·信息化·自动运维·itil
精益数智小屋2 小时前
设备维护方案核心功能拆解:一套好的设备维护方案如何解决设备突发故障
大数据·运维·网络·数据库·人工智能·面试·自动化