linux centos安装 miniconda python

介绍

Miniconda 是一款小巧的python环境管理工具,安装包大约只有几十M,其安装程序中包含conda软件包管理器和Python。一旦安装了Miniconda,就可以使用conda命令安装任何其他软件工具包并创建环境等

优点

  1. 安装python便捷。无论是在win还是linux环境下,安装方式类似 QQ,一路next即可。不像传统方式,需要编译源码。
  2. 方便的python库管理。conda在安装python包时会自动处理依赖包,只需要点确定就可以了。尤其是在安装opencv,TensorFlow等依赖较为复杂的包的时候,使用pip会需要手动处理很多依赖项,编译很多软件包,而conda不需要。conda甚至可以修改当前python的版本。
  3. 方便的python虚拟环境管理。conda命令可以方便的创建和删除python的虚拟环境。否则需要自己安装virtualenv等python包。
  4. Anaconda作为一个python发行版携带了很多科学计算的python包,但它太大了,有些包也不需要。而miniconda就小得多,只携带了conda所必须的依赖包。

下载

下载地址:https://docs.conda.io/en/latest/miniconda.html

清华软件镜像站: https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/

注意:一定要认准版本,最好不要下载miniconda,建议下载miniconda3

安装

上传

Miniconda3-py38_4.11.0-Linux-x86_64.sh 上传到 linux

授权

让该文件可执行:

chmod 777 ./Miniconda3-py38_4.11.0-Linux-x86_64.sh

安装

执行下面命令安装:

./Miniconda3-py38_4.11.0-Linux-x86_64

bash Miniconda3-py38_4.11.0-Linux-x86_64

提示如下,敲回车:

Please, press ENTER to continue

询问是否接收许可,选择 yes,如下:

Do you accept the license terms? [yes|no]

然后询问是否安装到 /root/miniconda3 目录,直接敲回车,如下:

Miniconda3 will now be installed into this location:
/root/miniconda3

最后询问是否初始化环境,选择 yes,如下:

Do you wish the installer to initialize Miniconda3
by running conda init? [yes|no]

看到下面提示说明安装成功:

Thank you for installing Miniconda3!

到这里就安装好了,重新打开终端,就有conda了

参考:
https://blog.csdn.net/sonia_liss/article/details/103426654


原文出处:https://malaoshi.top/show_1IX4vq4Fiis3.html