环境搭建03-Ubuntu16.04安装和卸载Anaconda

该文详细描述了在Ubuntu16.04上下载Anaconda的步骤,包括通过命令行进行安装,接受许可协议,选择安装路径,更新环境变量,并验证安装。此外,还提供了卸载Anaconda时删除安装目录和修改bashrc文件的步骤。
摘要由CSDN通过智能技术生成

1. 下载Anaconda

进入Anaconda官网 ,根据自己电脑的配置选择合适的版本

junli@ubuntu16:~$ wget https://repo.anaconda.com/archive/Anaconda3-4.4.0-Linux-x86_64.sh

2. 安装

junli@ubuntu16:~$ ls
Anaconda3-4.4.0-Linux-x86_64.sh  data              gpg     sensors  software  Workspace  模板  图片  下载  桌面
codes                            examples.desktop  nodejs  snap     tools     公共的     视频  文档  音乐
junli@ubuntu16:~$ 

## step1: 命令行安装 Anaconda
junli@ubuntu16:~$ bash Anaconda3-4.4.0-Linux-x86_64.sh 

Welcome to Anaconda3 4.4.0 (by Continuum Analytics, Inc.)

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>> 
===================================
Anaconda End User License Agreement
===================================

## step2: yes, 接受条款
Do you approve the license terms? [yes|no]
Please answer 'yes' or 'no':
>>> yes
......

## step3: 确认安装目录,默认按Enter,否则输入你想安装的位置。我这里直接默认安装目录。
Anaconda3 will now be installed into this location:
/home/junli/anaconda3

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/home/junli/anaconda3] >>> 
PREFIX=/home/junli/anaconda3
installing: python-3.6.1-2 ...
installing: _license-1.1-py36_1 ...
......
installation finished.

## step4: 是否将anaconda安装路径添加到系统环境中,yes
Do you wish the installer to prepend the Anaconda3 install location
to PATH in your /home/junli/.bashrc ? [yes|no]
[no] >>> yes

Prepending PATH=/home/junli/anaconda3/bin to PATH in /home/junli/.bashrc

......

## step5: 使其立即生效。安装环境写到'/home/junli/.bashrc'文件中,所有使用命令'source ~/.bashrc'
junli@ubuntu16:~$ source ~/.bashrc

## step6: 查看conda版本信息
junli@ubuntu16:~$ conda info
Current conda install:

               platform : linux-64
          conda version : 4.3.21
       conda is private : False
      conda-env version : 4.3.21
    conda-build version : not installed
         python version : 3.6.1.final.0
       requests version : 2.14.2
       root environment : /home/junli/anaconda3  (writable)
    default environment : /home/junli/anaconda3
       envs directories : /home/junli/anaconda3/envs
                          /home/junli/.conda/envs
          package cache : /home/junli/anaconda3/pkgs
                          /home/junli/.conda/pkgs
           channel URLs : http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64
                          http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch
                          http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64
                          http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch
            config file : /home/junli/.condarc
             netrc file : None
           offline mode : False
             user-agent : conda/4.3.21 requests/2.14.2 CPython/3.6.1 Linux/4.15.0-142-generic debian/stretch/sid glibc/2.23    
                UID:GID : 1000:1000

  1. 卸载
## step1: 删除安装目录
junli@ubuntu16:~$ rm -rf /home/junli/anaconda3

## step2: 注释/删除路径,保存并关闭.bashrc文件
junli@ubuntu16:~$ gedit ~/.bashrc

## step3: 使其立即生效。
junli@ubuntu16:~$ source ~/.bashrc

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值