Ubuntu如何安装Anaconda
这篇“Ubuntu如何安装Anaconda”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“Ubuntu如何安装Anaconda”文章吧。
员工经过长期磨合与沉淀,具备了协作精神,得以通过团队的力量开发出优质的产品。创新互联建站坚持“专注、创新、易用”的产品理念,因为“专注所以专业、创新互联网站所以易用所以简单”。公司专注于为企业提供成都网站设计、网站建设、微信公众号开发、电商网站开发,成都小程序开发,软件按需开发网站等一站式互联网企业服务。
下载anaconda
在撰写本文时,anaconda的最新稳定版本是5.3版本。
请选择 64-bit (x86) installer 进行下载链接: https://pan.baidu.com/s/1rna9d8gaghuie0ao_l5aqa 提取码: uecd 。尽量不要用python2.7,很多库已经不提供python2.7支持。
点击链接就会进行下载,同时会弹出信息收集框,直接关闭就好。
安装anaconda
$ sudo sh anaconda3-5.3.0-linux-x86_64.sh [sudo] andrew 的密码: welcome to anaconda3 5.3.0 in order to continue the installation process, please review the license agreement. please, press enter to continue >>> # 按下回车 ... # 多次按空格读完license。 do you accept the license terms? [yes|no] [no] >>> yes # 输入yes - press enter to confirm the location - press ctrl-c to abort the installation - or specify a different location below ... [/home/andrew/anaconda3] >>> /usr/local/anaconda3 # 输入自定义目录 ... # 安装根据机器性能,通常需要持续几分钟。 # 讨论 钉钉群21745728 qq群144081101 567351477 # 本文地址:https://www.jianshu.com/p/9fe9ff999234 do you wish to proceed with the installation of microsoft vscode? [yes|no] #选择no,一般来说自带的spyder和专业ide wingide更好用。 ... do you wish the installer to initialize anaconda3 in your /home/andrew/.bashrc ? [yes|no] [no] >>> # 选择yes initializing anaconda3 in /home/andrew/.bashrc a backup will be made to: /home/andrew/.bashrc-anaconda3.bak for this change to become active, you have to open a new terminal. thank you for installing anaconda3! =========================================================================== anaconda is partnered with microsoft! microsoft vscode is a streamlined code editor with support for development operations like debugging, task running and version control. to install visual studio code, you will need: - administrator privileges - internet connectivity visual studio code license: https://code.visualstudio.com/license do you wish to proceed with the installation of microsoft vscode? [yes|no] >>> no 添加“export path=/usr/local/anconda3/bin:$path“ 到/etc/profile,这样所有用户都可以使用anaconda python3.7了。 上面的.bashrc在刚才安装时添加了如下内容: # added by anaconda3 5.3.0 installer # >>> conda init >>> # !! contents within this block are managed by 'conda init' !! __conda_setup="$(conda_report_errors=false '/usr/local/anaconda3/bin/conda' shell.bash hook 2> /dev/null)" if [ $? -eq 0 ]; then \eval "$__conda_setup" else if [ -f "/usr/local/anaconda3/etc/profile.d/conda.sh" ]; then . "/usr/local/anaconda3/etc/profile.d/conda.sh" conda_changeps1=false conda activate base else \export path="/usr/local/anaconda3/bin:$path" fi fi unset __conda_setup~/.bashrc # <<< conda init <<<
验证安装
通过重新登陆或者执行'source ~/.bashrc"加载环境变量。
$ conda info active environment : base active env location : /usr/local/anaconda3 shell level : 1 user config file : /home/andrew/.condarc populated config files : conda version : 4.5.11 conda-build version : 3.15.1 python version : 3.7.0.final.0 base environment : /usr/local/anaconda3 (read only) channel urls : https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/free/linux-64 https://repo.anaconda.com/pkgs/free/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch https://repo.anaconda.com/pkgs/pro/linux-64 https://repo.anaconda.com/pkgs/pro/noarch package cache : /usr/local/anaconda3/pkgs /home/andrew/.conda/pkgs envs directories : /home/andrew/.conda/envs /usr/local/anaconda3/envs platform : linux-64 user-agent : conda/4.5.11 requests/2.19.1 cpython/3.7.0 linux/4.15.0-36-generic ubuntu/18.04 glibc/2.27 uid:gid : 1000:1000 netrc file : none offline mode : false $ python python 3.7.0 (default, jun 28 2018, 13:15:42) [gcc 7.2.0] :: anaconda, inc. on linux type "help", "copyright", "credits" or "license" for more information. >>>
至此,已经安装完毕。
更新anaconda
一般是有新版本发布时才需要使用。
$ conda update conda $ conda update anaconda
删除anaconda
一般是有新版本发布时才需要使用。
$sudo rm -rf /usr/local/anaconda3 删除上面~/.bashrc和/etc/profile的修改 清空隐藏文件: rm -rf ~/.condarc ~/.conda ~/.continuum
以上就是关于“Ubuntu如何安装Anaconda”这篇文章的内容,相信大家都有了一定的了解,希望小编分享的内容对大家有帮助,若想了解更多相关的知识内容,请关注创新互联行业资讯频道。
新闻标题:Ubuntu如何安装Anaconda
当前网址:http://myzitong.com/article/jhpjdo.html