在centos上安装miniconda、创建python环境并安装运行opencv

1 基础环境

centos7.9镜像,自带python2,以及基本的开发工具

2 安装miniconda

参考:在CentOS上的安装miniconda

  1. 切换目录

cd /data
  1. 安装wget

yum install wget -y
  1. 下载miniconda

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
  1. 安装miniconda

sh Miniconda3-latest-Linux-x86_64.sh
按提示,Enter
Do you accept the license terms? [yes|no],输入yes接受
安装完成后会问:Do you wish the installer to initialize Miniconda3,输入yes接受
  1. source ~/.bashrc或用户登录后会自动进入(base)环境

source ~/.bashrc
  1. 禁止 用户登录后 自动激活base环境,可执行如下命令:

conda config --set auto_activate_base false

3 创建Python虚拟环境及miniconda使用

    你可能感兴趣的:(centos,python,linux)