Linux(Ubuntu 18.04)上安裝Anaconda步驟詳解
Anaconda是最受歡迎的python數(shù)據(jù)科學(xué)和機(jī)器學(xué)習(xí)平臺(tái),用于大規(guī)模數(shù)據(jù)處理,預(yù)測分析和科學(xué)計(jì)算。Anaconda發(fā)行版附帶了1,000多個(gè)數(shù)據(jù)包,conda命令行工具和Anaconda Navigator的桌面圖形用戶界面。
本教程將指導(dǎo)您完成在Ubuntu 18.04上下載和安裝Anaconda Python Distribution。
下載Anaconda
在撰寫本文時(shí),Anaconda的最新穩(wěn)定版本是5.3版本。
請選擇 64-Bit (x86) Installer 進(jìn)行下載鏈接: https://pan.baidu.com/s/1rNA9D8gaGHuIE0Ao_l5AQA 提取碼: uecd 。盡量不要用python2.7,很多庫已經(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 >>> # 按下回車 ... # 多次按空格讀完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,一般來說自帶的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)證安裝
通過重新登陸或者執(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
總結(jié)
到此這篇關(guān)于Linux(Ubuntu 18.04)上安裝Anaconda步驟詳解的文章就介紹到這了,更多相關(guān)linux 安裝 anaconda內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
Easypanel免費(fèi)的VPS主機(jī)面板 可跨平臺(tái)Linux和Windows
Easypanel是一款免費(fèi)的功能強(qiáng)大集開通虛擬主機(jī),ftp空間,數(shù)據(jù)庫等功能為一體的主機(jī)控制面板,具備跨平臺(tái)(windows,linux),安全穩(wěn)定、操作簡便等特點(diǎn),感興趣的小伙伴們可以關(guān)注一下2017-07-07Linux 命令行通配符及轉(zhuǎn)義符的實(shí)現(xiàn)
這篇文章主要介紹了Linux 命令行通配符及轉(zhuǎn)義符的實(shí)現(xiàn),小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2018-11-11bug分支和feature分支_動(dòng)力節(jié)點(diǎn)Java學(xué)院整理
這篇文章主要介紹了bug分支和feature分支,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2017-08-08在Linux 服務(wù)器下修改防火墻允許該端口遠(yuǎn)程訪問的方法
今天小編就為大家分享一篇在Linux 服務(wù)器下修改防火墻允許該端口遠(yuǎn)程訪問的方法,具有很好的參考價(jià)值,希望對大家有所幫助。一起跟隨小編過來看看吧2019-07-07Linux定時(shí)備份數(shù)據(jù)庫到指定郵箱的方法
這篇文章主要介紹了Linux定時(shí)備份數(shù)據(jù)庫到指定郵箱的方法,非常不錯(cuò),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2018-07-07搭建一個(gè)大型網(wǎng)站架構(gòu)的實(shí)驗(yàn)環(huán)境(Squid緩存服務(wù)器篇)
Squid是一個(gè)高性能的代理緩沖服務(wù)器,也許你已經(jīng)用過Windows平臺(tái)下的WinGate,MS Proxy Server等功能類似的產(chǎn)品。2009-07-07Linux netstat命令查看并發(fā)連接數(shù)的方法
當(dāng)我們的網(wǎng)站部署在linux的服務(wù)器上,特別是web服務(wù)器,我們可能有時(shí)候做為運(yùn)維人員,肯定是要查看網(wǎng)站的并發(fā)連接數(shù)是不是達(dá)到瓶頸等,所以在linux下,我們?nèi)绾尾榭捶?wù)器的并發(fā)連接數(shù)呢?下面這篇文章就給大家詳細(xì)的介紹了Linux netstat命令查看并發(fā)連接數(shù)的方法。2016-11-11