ubuntu安装conda

本文涉及的产品
实时数仓Hologres,5000CU*H 100GB 3个月
智能开放搜索 OpenSearch行业算法版,1GB 20LCU 1个月
实时计算 Flink 版,5000CU*H 3个月
简介: ubuntu安装conda

实现目标

在 ubuntu 系统下安装 conda

参考资料

anaconda安装参考文档: https://docs.anaconda.com/free/anaconda/install/linux/

环境说明

系统环境: Ubuntu 22.04.3 LTS
安装用户使用 root 用户安装
安装版本 Anaconda3-2024.02-1
安装路径 /opt/anaconda3

安装步骤

  1. 下载 Anaconda3-2023.09-Linux-x86_64.sh
# Replace <INSTALLER_VERSION> with the version of the installer file you want to download
# For example, https://repo.anaconda.com/archive/Anaconda3-2023.09-0-Linux-x86_64.sh
# All installers can be found at repo.anaconda.com/archive/
curl -O https://repo.anaconda.com/archive/Anaconda3-Anaconda3-2024.02-1-Linux-x86_64.sh
  1. 安装
bash Anaconda3-2023.09-Linux-x86_64.sh

# 成功后输出

Preparing transaction: done
Executing transaction: |

    Installed package of scikit-learn can be accelerated using scikit-learn-intelex.
    More details are available here: https://intel.github.io/scikit-learn-intelex

    For example:

        $ conda install scikit-learn-intelex
        $ python -m sklearnex my_application.py


                                                                                                                                                                                 done
installation finished.
Do you wish to update your shell profile to automatically initialize conda?
This will activate conda on startup and change the command prompt when activated.
If you'd prefer that conda's base environment not be activated on startup,
   run the following command when conda is activated:

conda config --set auto_activate_base false

You can undo this by running `conda init --reverse $SHELL`? [yes|no]
[no] >>> no

You have chosen to not have conda modify your shell scripts at all.
To activate conda's base environment in your current shell session:

eval "$(/opt/anaconda3/bin/conda shell.YOUR_SHELL_NAME hook)"

To install conda's shell functions for easier access, first activate, then:

conda init



# 静默安装
bash Anaconda3-2024.02-1-Linux-x86_64.sh -b -p /opt/anaconda3 -f
  1. 配置

cd /opt/anaconda3

./bin/conda init bash
cat .bashrc

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/opt/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/opt/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/opt/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/opt/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

回退 参考 ./bin/conda init --reverse bash

conda config --set auto_activate_base false

cat ~/.condarc
```bash
auto_activate_base: false

pkgs_dirs:

  • /data/anaconda3/pkgs
  • /opt/anaconda3/pkgs

envs_dirs:

  • /data/anaconda3/envs
    ```
  1. 创建环境
 conda create --name hello python=3.8

conda activate hello
conda deactivate

conda env remove --name hello
  1. 其他命令
    ```bash

conda env list

conda list
conda info
conda search
```

多环境问题解决

问题:前文说道我的安装用户是root, 安装后 conda env list 显示的是 还有其他用户创建的环境,看着有点奇怪,想去掉,但是不能影响其他用户

目录
相关文章
|
2月前
|
Ubuntu Shell 网络安全
安装了ubuntu虚拟机后发现shell无法连接 ubuntu开启ssh连接
【8月更文挑战第23天】安装了ubuntu虚拟机后发现shell无法连接
116 6
|
1天前
|
存储 Ubuntu
关于实体机安装Ubuntu 22.04.3-desktop-amd64遇见的一些问题
【10月更文挑战第2天】本文详细介绍了在使用 Ubuntu 过程中常见的五个问题及其解决方案:下载镜像文件速度慢或损坏,可更换镜像源或验证哈希值;制作启动盘失败,需检查 U 盘及设置;安装过程中的分区问题,需合理规划分区;安装后的驱动问题,可通过安装官方驱动解决;软件安装和更新问题,需检查仓库配置及依赖关系。
|
1月前
|
Ubuntu Linux Docker
Ubuntu 18.04 安装Docker实战案例
关于如何在Ubuntu 18.04系统上安装Docker的实战案例,包括安装步骤、配置镜像加速以及下载和运行Docker镜像的过程。
157 3
Ubuntu 18.04 安装Docker实战案例
|
1月前
|
Ubuntu 网络安全 开发工具
Ubuntu19.04的安装过程详解以及操作系统初始化配置
本文详细介绍了Ubuntu 19.04操作系统的安装过程、初始化配置、网络设置、软件源配置、SSH远程登录以及终端显示设置。
60 1
Ubuntu19.04的安装过程详解以及操作系统初始化配置
|
17天前
|
存储 Prometheus 监控
在Ubuntu系统上安装与配置Prometheus的步骤
通过以上步骤,您应该已经成功在Ubuntu系统上安装并配置了Prometheus。您现在可以开始使用Prometheus收集和分析您的系统和应用程序的指标数据了。
36 1
|
2月前
|
并行计算 Ubuntu PyTorch
Ubuntu下CUDA、Conda、Pytorch联合教程
本文是一份Ubuntu系统下安装和配置CUDA、Conda和Pytorch的教程,涵盖了查看显卡驱动、下载安装CUDA、添加环境变量、卸载CUDA、Anaconda的下载安装、环境管理以及Pytorch的安装和验证等步骤。
162 1
Ubuntu下CUDA、Conda、Pytorch联合教程
|
1月前
|
Ubuntu NoSQL
ubuntu上安装某个程序的符号表和源码包
ubuntu上安装某个程序的符号表和源码包
|
1月前
|
Ubuntu
在树莓派4B上安装ubuntu系统
在树莓派4B上安装ubuntu系统
|
1月前
|
Ubuntu
使用dpkg在ubuntu上安装软件包遇到依赖包的问题
使用dpkg在ubuntu上安装软件包遇到依赖包的问题
|
2月前
|
Ubuntu Shell C++
在Ubuntu18.04上安装ros2的环境,ros2的常用命令:播放包、录制包等
在Ubuntu18.04上安装ros2的环境,ros2的常用命令:播放包、录制包等
42 1
下一篇
无影云桌面