您当前的位置:首页 > 计算机 > 系统应用 > Linux

Ubuntu16.04安装anaconda

时间:07-02来源:作者:点击数:

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

3.卸载

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

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

## step3: 使其立即生效。
junli@ubuntu16:~$ source ~/.bashrc
方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门