1、python安裝
????https://www.python.org/
????????安裝時注意勾選Add?python?xx?to?path (將python加入到系統(tǒng)環(huán)境變量)
2偎痛、Jupyter Notebook?和?pip
? ? ? ? 運行cmd旱捧,切換到python安裝目錄,運行pip?install
C:\Users\Administrator>cd /d D:\
D:\>cd D:\SoftWare\Python\Python36\Scripts??
D:\SoftWare\Python\Python36\Scripts>pip install jupyter
3踩麦、?jupyter notebook的啟動
????????????命令行窗口輸入:jupyter notebook
同時枚赡,默認(rèn)瀏覽器會打開?Jupyter notebook?窗口。 說明?Jupyter notebook?安裝成功了谓谦。
4贫橙、配置?Jupyter notebook
jupyter notebook --generate-config
D:\SoftWare\Python\Python36\Scripts>jupyter notebook --generate-config
修改jupyter_notebook_config.py配置文件
打開這個配置文件,找到“c.NotebookApp.notebook_dir=……”反粥,把路徑改成自己的工作目錄卢肃。
比如,這里要變更為
## The directory to use for notebooks and kernels.
c.NotebookApp.notebook_dir = 'D:\Code\jupyter-notebook'
才顿,當(dāng)然莫湘,文件夾?jupyter-notebook?需要自己創(chuàng)建好。
配置文件修改完成后郑气, 以后在?jupyter notebook?中寫的代碼等都會保存在自己創(chuàng)建的目錄中幅垮。?
?jupyter notebook的自定義啟動(變了)
配置文件修改成后,就可以啟動?jupyter notebook?了尾组,命令行窗口中輸入?jupyter notebook忙芒,
默認(rèn)瀏覽器就會打開一個頁面?
?jupyter notebook的啟動
命令行窗口輸入:jupyter notebook
以前是
現(xiàn)在是
5、R的安裝
? ??????https://www.r-project.org/index.html
6讳侨、GitHub安裝
? ??????https://blog.csdn.net/qazwsxpcm/article/details/68946736
7呵萨、配置R,使Jupyter?Notebook支持R
? ? 在R命令行下跨跨,運行
install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest'))
devtools::install_github('IRkernel/IRkernel')
上面的代碼會自動分兩步執(zhí)行潮峦,執(zhí)行完后,在輸入如下代碼中的一個:
# 只在當(dāng)前用戶下安裝
IRkernel::installspec()
# 或者是在系統(tǒng)下安裝
IRkernel::installspec(user = FALSE)
等待執(zhí)行完畢,打開jupyter就可以新建R的notebook了跑杭。
恩~ 就是這么簡單铆帽,接下來就可以愉快的寫R了
---------------------
https://blog.csdn.net/qazwsxpcm/article/details/68946736