這篇“Ubuntu如何安裝Anaconda”文章的知識(shí)點(diǎn)大部分人都不太理解,所以小編給大家總結(jié)了以下內(nèi)容,內(nèi)容詳細(xì),步驟清晰,具有一定的借鑒價(jià)值,希望大家閱讀完這篇文章能有所收獲,下面我們一起來(lái)看看這篇“Ubuntu如何安裝Anaconda”文章吧。
員工經(jīng)過(guò)長(zhǎng)期磨合與沉淀,具備了協(xié)作精神,得以通過(guò)團(tuán)隊(duì)的力量開(kāi)發(fā)出優(yōu)質(zhì)的產(chǎn)品。創(chuàng)新互聯(lián)建站堅(jiān)持“專注、創(chuàng)新、易用”的產(chǎn)品理念,因?yàn)椤皩W⑺詫I(yè)、創(chuàng)新互聯(lián)網(wǎng)站所以易用所以簡(jiǎn)單”。公司專注于為企業(yè)提供成都網(wǎng)站設(shè)計(jì)、網(wǎng)站建設(shè)、微信公眾號(hào)開(kāi)發(fā)、電商網(wǎng)站開(kāi)發(fā),成都小程序開(kāi)發(fā),軟件按需開(kāi)發(fā)網(wǎng)站等一站式互聯(lián)網(wǎng)企業(yè)服務(wù)。
下載anaconda
在撰寫(xiě)本文時(shí),anaconda的最新穩(wěn)定版本是5.3版本。
請(qǐng)選擇 64-bit (x86) installer 進(jìn)行下載鏈接: https://pan.baidu.com/s/1rna9d8gaghuie0ao_l5aqa 提取碼: uecd 。盡量不要用python2.7,很多庫(kù)已經(jīng)不提供python2.7支持。
點(diǎn)擊鏈接就會(huì)進(jìn)行下載,同時(shí)會(huì)彈出信息收集框,直接關(guān)閉就好。
安裝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 >>> # 按下回車(chē) ... # 多次按空格讀完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 # 輸入自定義目錄 ... # 安裝根據(jù)機(jī)器性能,通常需要持續(xù)幾分鐘。 # 討論 釘釘群21745728 qq群144081101 567351477 # 本文地址:https://www.jianshu.com/p/9fe9ff999234 do you wish to proceed with the installation of microsoft vscode? [yes|no] #選擇no,一般來(lái)說(shuō)自帶的spyder和專業(yè)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在剛才安裝時(shí)添加了如下內(nèi)容: # 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 <<<
驗(yàn)證安裝
通過(guò)重新登陸或者執(zhí)行'source ~/.bashrc"加載環(huán)境變量。
$ 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. >>>
至此,已經(jīng)安裝完畢。
更新anaconda
一般是有新版本發(fā)布時(shí)才需要使用。
$ conda update conda $ conda update anaconda
刪除anaconda
一般是有新版本發(fā)布時(shí)才需要使用。
$sudo rm -rf /usr/local/anaconda3 刪除上面~/.bashrc和/etc/profile的修改 清空隱藏文件: rm -rf ~/.condarc ~/.conda ~/.continuum
以上就是關(guān)于“Ubuntu如何安裝Anaconda”這篇文章的內(nèi)容,相信大家都有了一定的了解,希望小編分享的內(nèi)容對(duì)大家有幫助,若想了解更多相關(guān)的知識(shí)內(nèi)容,請(qǐng)關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。