CentOS7安装Anconda

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/iFan138/article/details/88423522

安装

下载安装脚本

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

执行脚本安装

bash Miniconda3-latest-Linux-x86_64.sh
# 阅读说明
# 选择安装目录
/usr/local/miniconda3
# 是否安装vscode
# 是否添加环境变量
no
# 安装完成
source /usr/local/miniconda3/etc/profile.d/conda.sh

测试安装结果 查看版本

conda -V

安装出错

错误1

当安装出错,要进行重新安装的时候,需要手动删除安装目录下的文件夹,进行重新安装,否则安装失败。

错误2

Anaconda3-2018.12-Linux-x86_64.sh: line 353: bunzip2: command not found
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors

yum install -y bzip2

使用

创建一个名称为python3.6,python版本为3.6.8的环境

conda create -n spider python=3.6

激活环境

conda activate spider

退出环境

conda deactivate

查看创建过的环境

conda env list

查看安装过的python包

conda list
pip list

删除安装过的环境

conda remove -n python3.6 --all

猜你喜欢

转载自blog.csdn.net/iFan138/article/details/88423522