上個(gè)月參加 IBM 的云計(jì)算論壇盒揉,其中其最大的特點(diǎn)就是 IBM整合了市面上幾乎大部分跟機(jī)器學(xué)習(xí)和數(shù)據(jù)分析 及數(shù)據(jù)科學(xué)相關(guān)的開源項(xiàng)目王污,打造出自己的平臺(tái),不過也可以看得出在開源力量的影響下隅居,IBM 這個(gè)昔日的巨人好像有點(diǎn)力不從心止后,不過總說瘦死的駱駝比馬大瞎惫,IBM只要還打算茍活,只要戰(zhàn)略 親民坯门,向開源項(xiàng)目媾和微饥,依然可以活的很滋潤(rùn)
自然我在大會(huì)上看到的和體驗(yàn)到的就是 Jupyter 和Zeppelin 這兩個(gè)web 端 language notebook的強(qiáng)大之處,確實(shí)驚艷到了古戴,之前參加一些量化投資的網(wǎng)站欠橘,比如優(yōu)礦,在線可以使用python編程现恼,當(dāng)時(shí)也讓我很驚訝肃续,不過對(duì)于java 重量級(jí),估計(jì)要等到 java9 沒準(zhǔn)可以實(shí)現(xiàn)
1.Mac 安裝 Zeppelin
其實(shí)mac安裝 Zeppelin超級(jí)簡(jiǎn)單叉袍,在 homebrew的可視化 cakebrew下 搜索zeppelin即可 下載安裝始锚,安裝后
$ ./bin/zeppelin-daemon.sh start
開啟 zeppelin的后臺(tái)保衛(wèi)程序
我安裝的的是0.7版本,但是如果想在 web瀏覽器看到 zeppelin還是需要下一步
進(jìn)入 zeppelin的安裝目錄喳逛,會(huì)看到 zeppelin-web-0.7.war 瞧捌,這個(gè)war 包需要放到 tomcat的 webapps目錄下 并啟動(dòng)tomcat ,才可以 在瀏覽器看到 zeppelin 的web 界面
Zeppelin 相當(dāng)強(qiáng)大润文,支持的語言和dsl很多姐呐,其中R語言可以由 spark.r 環(huán)境執(zhí)行
2.Mac 安裝 Jupyter
Jupyter 從 拼寫中就可以看到python的影子,所以安裝Jupyter也是通過python的典蝌,因?yàn)镴upyter-client依賴 Anaconda曙砂,
pip3 install Jupyter
安裝成功后,啟動(dòng)Jupyter
jupyter notebook
jupyter 默認(rèn)支持 Julia和Python 3骏掀,默認(rèn)不支持R【這個(gè)是我安裝好R插件后的截圖】
這個(gè)時(shí)候 mac 電腦本地需要安裝 R 語言 鸠澈,我安裝 3.4版本柱告。
https://cran.rstudio.com/bin/macosx/R-3.4.0.pkg
還可以安裝 Rstudio
https://download1.rstudio.org/RStudio-1.0.143.dmg
安裝好后,在github找到 jupyter的R插件
https://github.com/IRkernel/IRkernel
發(fā)現(xiàn) 根據(jù)安裝向?qū)Τ拢€是有問題际度,報(bào)錯(cuò),根據(jù)網(wǎng)絡(luò)中找到的資料來看
在其issue中找到了答案
https://github.com/IRkernel/IRkernel/issues/469
首先呢 先安裝 jupyter-client 通過 anocanda 命令
(conda install -c anaconda jupyter_client=5.0.1)
然后 需要安裝下面的包新锈,然后在 mac 的Terminal中操作 R
$ r
進(jìn)入 R 環(huán)境
依賴的包 安裝好了,再安裝插件
command: >devtools::install_github('IRkernel/IRkernel') 10-Last but not least, type the following
command: >IRkernel::installspec()
這里有一些需要安裝的R語言的包
http://r.789695.n4.nabble.com/IRkernel-Installation-Issues-td4727884.html
1-Go to the page [https://irkernel.github.io/installation](https://irkernel.github.io/installation)2-Open the R console (I have R version 3.3.2) 3-Go to the step where it says "Installing via supplied binary packages (default on Windows + Mac OS X) 4-Instead of installing all the packages using one single command as suggested in the installation instructions, go to the R console and install all of the packages one by one, as follows
>install.packages('repr')
>install.packages('IRdisplay')
>install.packages('evaluate')
>install.packages('crayon')
>install.packages('pbdZMQ')
>install.packages('devtools')
>install.packages('uuid')
>install.packages('digest')
5-Connect to a CRAN mirror and select install packages, look for the package githubinstall and clic on it to install it 6-Start loading each one of the packages installed like this:
>library("repr")
>library("IRdisplay")
>library("evaluate")
>library("crayon")
>library("pbdZMQ")
>library("devtools")
>library("uuid")
>library("digest")
>library("githubinstall") 7-After this you have to update jsonlite which is a dependencie of package githubinstall, you update jsonlite using the following command: >update.packages('jsonlite') 8-After this, you have to type the following commands:
>library(httr)
>set_config(use_proxy(url="the required IP", port=8080, username="your network user", password="the password you use to unlock your computer")) >#you can get the required IP going to the command prompt and using the command ping >#port has to be 8080 9-type use the
總的來說甲脏,安裝還是非常便利眶熬,這幾天 windows爆發(fā)病毒妹笆,mac 沒有被波及,實(shí)屬幸運(yùn)