ubuntu14.04環(huán)境搭建——python、R

python

ubuntu系統(tǒng)默認(rèn)是python2.7
sudo apt-get install python-pip
修改pip的源(默認(rèn)源下載太慢)
sudo vim ~/.pip/pip.conf 添加

trusted-host=mirrors.aliyun.com
index-url=http://mirrors.aliyun.com/pypi/simple/```

sudo apt-get install python-numpy
sudo apt-get install python-scipy
sudo apt-get install python-matplotlib
sudo apt-get install python-sklearn
sudo pip install pandas

sudo apt-get install ipython

sudo pip install notebook

sudo apt-get install ipython-notebook

##R安裝
###安裝最新版本
sudo vim /etc/apt/sources.list    添加以下信息:
deb [http://mirror.bjtu.edu.cn/cran/bin/linux/ubuntu](http://mirror.bjtu.edu.cn/cran/bin/linux/ubuntu) trusty/            
deb [http://mirror.neu.edu.cn/ubuntu/](http://mirror.neu.edu.cn/ubuntu/) trusty-backports main restricted universe
sudo apt-get update 

###如果遇到錯誤:
Reading package lists... Done
W: GPG error: http://mirror.bjtu.edu.cn trusty/ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 51716619E084DAB9
輸入: 
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 51716619E084DAB9
###安裝R與開發(fā)工具
sudo apt-get upgrade  
sudo apt-get install r-base
sudo apt-get install gdebi-core
>開發(fā)工具推薦Rstudio
sudo gdebi rstudio-0.99.484-amd64.deb
>R包換國內(nèi)的源tools-->global option-->package 換成國內(nèi)的源
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容