windowsä¸ã®pythonã®å®è¡ç°å¢ãæ´åãã¦ãã¦ãã¾ãã¾anacondaã®ã©ã¤ã»ã³ã¹ã確èªããã¨ã
ç¥ãã¬éã«ã©ã¤ã»ã³ã¹ãå¤ãã£ã¦ãã¾ããã
å人å©ç¨ã§ã¯å½±é¿ã¯ç¡ãã®ã§ãããããããã©ã¤ã»ã³ã¹ã«æ¯ãåãããã®ã¯å«ã§ãããããä»äºå ´ã¨å®¶åºã®å®è¡ç°å¢ãéçºç°å¢å¤ããå¿
è¦ããã£ããã¨ã
ã¹ãã¬ã¹ããããã®ã§ãè±Anacondaãããã¨ã«æ±ºãã¾ããã
ä»åã¯ããã®ä»£ç¨åã¨ãã¦jupyter lab desktopã使ã£ã¦ã¿ãææ³ãè¨è¼ãããã¨æãã¾ãã
- Anaconda ã¨ã¯
- jupyterlab desktop appã¯jupyterlabã®ã¤ã³ã¹ãã¼ã«ã¢ããª
- jupyter notebook ã¯éçºãåæ¢ãã¦ãã¦ãä»å¾ã¯jupyterlabã主æµã¨ãªã
- jupyterlabã®ã¤ã³ã¹ãã¼ã«ãã©ã¯
- ã©ã¤ãã©ãªã®ã¤ã³ã¹ãã¼ã«æ¹æ³
- ã³ã¼ãã®å®è¡æ¹æ³
- ããã©ã«ãã§ãããã¬ãå©ç¨å¯è½ãªã®ã§åå¿è ã«ããããã
- ãã¼ã¯ã¢ã¼ãã«ãã
- 注æï¼jupyterlab desktop ã¯æ¡å¼µæ©è½ã使ããªã
- jupyterlabã¯jupyternotebookã§ä½¿ããæ©è½ãä¸é¨ä½¿ããªããã¨ã«æ³¨æ
- jupyter ã使ãã¨htmlæç« ãç°¡åã«ä½æã§ãã
- ã¾ã¨ã
- ãã¾ãï¼streamlit ã®æ¹ãå¯è¦åæ©è½ã¯åªç§
Anaconda ã¨ã¯
Anacondaã¨ã¯ãpythonã便å©ã«æ±ãããã®ã½ããã¦ã§ã¢ãã¾ã¨ããããã±ã¼ã¸ã§ãã
ããä¸ã¤ãã¤ã³ã¹ãã¼ã«ããã ãã§ããã¼ã¿è§£æã«å¿
è¦ãªã©ã¤ãã©ãªãä¸éãæãã¾ãã
æåä¼æ¥ãå¤æ°ã¹ãã³ãµã¼ã¨ãªã£ã¦ããç¥å度ãé«ãããã¼ã¿ãµã¤ã¨ã³ãã£ã¹ãã®ç¬¬ä¸æ©ã®ãã¼ã«ã¨ãã¦é¸ãã 人ãå¤ãã®ã§ã¯ãªãã§ããããã
å¤æ°ã®å
容ãé次確èªå¯è½ãªspyderãGUIã§ã©ã¤ãã©ãªãã¤ã³ã¹ãã¼ã«ãããã¨ããªã親åãªãã¼ã«ã§ãã
å¤æ´å¾anaconda ã¯åç¨å©ç¨ä¸å¯
å¤æ´å¾ã®Anacondaã¯åç¨å©ç¨ä¸å¯ã§ãã
å人使ç¨ã«ã¯åé¡ããã¾ããããä»äºã®å»¶é·ç·ãåå¼·ç®çã§å©ç¨ãã¦ããå ´åã¯ä¸ä¾¿ã§ãã
ãã¤å人使ç¨ãæåã«ãªãããåããã¾ããããããããAnacondaã¯ãã¼ã¿è§£æã©ã¤ãã©ãªãå¯ãéãããã®ã«ãããã
Anacondaã§ãªããã°ã§ããªãã¨ãã£ãç¨éã¯ç§ã®ç¥ãéãç¡ã代æ¿æ段ãå¤ãã®ã§æ£ç´ãªã¨ãããéãåºãã¾ã§ã®ãã®ã§ã¯ç¡ãã¨æã£ã¦ãã¾ãã
ä¸é¨ã®ã©ã¤ãã©ãªã¯anacondaç¨ã«æé©åããã¦ãå¦çé度ãæ©ããªã©ã®å©ç¹ã¯ããã¾ãããããããå人å©ç¨ã§ã¯æ°ã«ãªããªãã¨æãã¾ãã
Anacondaã®ä»£æ¿å©ç¨ã¯minicondaãæ軽
Anacondaã®ä»£æ¿æ段ã§ãããæ£ç´ãªã¨ããããªãå¤ãã§ããã
Anacondaã®ä½¿ãåæããã®ã¾ã¾ã«ä½¿ããããªãã²ã¨ã¾ãminicondaãããããã§ãã
minicondaã¯Anacondaã®åç¨é¨åãåãè½ã¨ãã軽éçã®ãã®ã§ãAnacondaã¨åãã¿ã¼ããã«ã³ãã³ãã使ãã¾ãã
ãã ãGUIã¯ç¨æããã¦ããªãã®ã§ãä»®æ³ç°å¢ãããã±ã¼ã¸ç®¡çã¯ã³ãã³ãã©ã¤ã³ãã¼ã¹ã§è¡ãå¿
è¦ãããã¾ãã
ã¾ããã³ãã³ãã©ã¤ã³ãã¼ã¹ã§æä½ãããªãUbuntuã®æ¹ãä½ãã¨ä¾¿å©ã ã£ãããAnacondaã¨åæ§ã«ãã¤ã©ã¤ã»ã³ã¹ãå¤æ´ããã¦ããããããªãã®ã§ã
ä»åã¯ãwindowsç°å¢ã«ããã代æ¿æ段ã®ä¸ã¤ã¨ãã¦jupyterlab desktop appã使ã£ã¦ã¿ã¾ããã
minicondaããã®ä»ã®ä»£æ¿æ段ã«ã¤ãã¦ã¯ä¸è¨ã®è¨äºã§è¨è¿°ãã¦ãã¾ãã®ã§ããããã°èªãã§ãã ããã¨å¬ããã§ãã
jupyterlab desktop appã¯jupyterlabã®ã¤ã³ã¹ãã¼ã«ã¢ããª
jupyterlab desktop appã¯jupyterlabã®ã¤ã³ã¹ãã¼ã«ç¨ã¢ããªã§ãã
jupyterlab ã¯é常pythonãã¤ã³ã¹ãã¼ã«ãã¦ãpipã§ã¤ã³ã¹ãã¼ã«ãã¾ããããã¡ãã¯ãã¦ã³ãã¼ãå¾ãã¿ã³ãã¯ãªãã¯ããã ãã§æ軽ã«ã¤ã³ã¹ãã¼ã«ã§ãã¾ãã
ã¾ããElectron ã¨ããwebã¢ããªããã¼ã«ã«ã¢ããªåããæè¡ãç¨ãã¦ããã®ã§ãå¾æ¥ã®ä½¿ç¨æããã®ã¾ã¾ã«ããä¸ã§ãã©ã¦ã¶ãçµç±ããã«ä½¿ç¨ãããã¨ãã§ãã¾ãã
jupyter notebook ã¯éçºãåæ¢ãã¦ãã¦ãä»å¾ã¯jupyterlabã主æµã¨ãªã
jupyter notebook ã¯ç¾å¨æ°æ©è½ã®éçºãåæ¢ããã¦ãããjupyterlabã«éçºãå¼ãç¶ããã¦ãã¾ãã
jupyter notebookã¯æ°æè¡ã¸ã®å¯¾å¿ã¯æå¾
ã§ããªãã®ã§ãããããpythonãå§ãããã¨ãã人ã¯jupyterlabã使ãããã«ãã¾ãããã
jupyterlabã®ã¤ã³ã¹ãã¼ã«ãã©ã¯
jupyterlab ã¯githubãããã¦ã³ãã¼ãã§ãã¾ãã
ã¤ã³ã¹ãã¼ã©ã¼ã®ã¬ã¤ãã«å¾ãã°åé¡ãªãã¤ã³ã¹ãã¼ã«ã§ããã¨æãã¾ãã
ç§ã®å ´åã¯ãwindowsãªã®ã§ä¸å³ã®èµ¤ä¸¸å°ãé¸æãã¾ããã
ã©ã¤ãã©ãªã®ã¤ã³ã¹ãã¼ã«æ¹æ³
jupyterlabã¯ãã¼ã«ã«ã¢ããªã¨ããé½åä¸ãã³ãã³ãã©ã¤ã³ãç¨ãã¦ã©ã¤ãã©ãªãã¤ã³ã¹ãã¼ã«ãããã¨ãã§ãã¾ããã
ãªã®ã§ãã¤ã³ã¹ãã¼ã«ãjupyterã®ã³ã¼ãä¸ã§è¡ãã¾ãã
æé ã¯ç°¡åã§ãå
é ã«%pip install ââã¨ããã°ã¤ã³ã¹ãã¼ã«ã§ãã¾ãã
google colabãªã©ã¨åãè¨æ³ãªã®ã§è¦ªãã¿ãããã¨æãã¾ãã
ãã¨ãã°ãæ ªä¾¡ç¿å¾ã©ã¤ãã©ãªã§ããquandl ãå©ç¨ãããå ´åã¯æ¬¡ã®ããã«æ¸ããã¨ãã§ãã¾ãã
%pip install quandl
ã³ã¼ãã®å®è¡æ¹æ³
ã³ã¼ãã®å®è¡æ¹æ³ã¯ãjupyternotebookã¨åãã§ãã
ã»ã«ã«ã¹ã¯ãªãããæ¸ãã¦ãå®è¡ãã¿ã³ãæ¼ãã°å®äºã§ãã
試ãã«ãquandlã§æ ªä¾¡ã表示ãã¦ã¿ã¾ããã
import quandl import matplotlib.pyplot as plt data_takara = quandl.get('TSE/2531') # Quandl codeãããã¦ãã ããã # ãã¼ã¿ããããã ax = data_takara['Open'].plot() ax.set_xlabel('date') ax.set_ylabel('Price') plt.show()
ããã©ã«ãã§ãããã¬ãå©ç¨å¯è½ãªã®ã§åå¿è ã«ããããã
jupyterlabã§ã¯ããã©ã«ãã§ãããã¬ãå©ç¨å¯è½ã§ãã
jupyternotebookã§ã¯ãæéæããã¦æ¡å¼µã©ã¤ãã©ãªãã¤ã³ã¹ãã¼ã«ãããã¨ã§å©ç¨å¯è½ã§ãããããããªæéã¯è¦ãã¾ããã
å¤æ°ã®å
容ãåããããã表示ãããã®ã§ãã©ãã©ã使ã£ã¦ããã¾ãããã
使ãæ¹ã¯ç°¡åã§ãå®è¡ç»é¢ã®å³ä¸ã®ãã¼ã¯ãæ¼ãã°ãããã¬ã¢ã¼ãã«ãªãã¾ãã
ãã¼ã¯ã¢ã¼ãã«ãã
å人ã®å¥½ã¿ã§ããããã¼ã¯ãã¼ãã«ãç°¡åã«ã§ãã¾ãã Settings> JupyterLab Theme>JupyterLab Dark
注æï¼jupyterlab desktop ã¯æ¡å¼µæ©è½ã使ããªã
使ã£ã¦ã¦æãã¾ããããjupyterlabdesktopã¯æ¡å¼µæ©è½ã®ã¤ã³ã¹ãã¼ã«ã¦ã¤ã³ãã¦ãç¡ãï¼ nodejsãå¿ è¦ã¨ããæ¡å¼µæ©è½ãå¤ãã®ã§ä»æ¹ãªãã®ããããã¾ããããæ©ã対å¿ããã¨è¯ãã§ããã
jupyterlabã¯jupyternotebookã§ä½¿ããæ©è½ãä¸é¨ä½¿ããªããã¨ã«æ³¨æ
jupyterlabã¯ã¾ã ã¾ã éçºéä¸ã§ããµã¼ããã¼ãã£è£½ã®ã©ã¤ãã©ãªãåããªãã£ãããnotebookã¨ã¯æ¸ãæ¹ãç°ãªã£ã¦ãããã¨ãããã¨ãããããã¾ãã
å¤ãããã®è³ç£ã使ãããå ´åãªã©ã¯æ°ãã¤ãã¾ãããã
å ´åã«ãã£ã¦ã¯ãnotebookã使ãç¶ããã®ãæããããã¾ããã
jupyter ã使ãã¨htmlæç« ãç°¡åã«ä½æã§ãã
jupyter ã使ãã¨åçãªã°ã©ãããwebå°å³ãã¤ããæç« ãç°¡åã«ä½æã§ãã¾ãã
詳ããã¯ä¸è¨ã®è¨äºã§è§£èª¬ãã¦ããã¾ãã®ã§ãåèã«ãã¦ãã ããã¨å¬ããã§ãã
ã¾ã¨ã
ä»åã¯ãpythonã®å®è¡ç°å¢ã¨ãã¦jupyterlabãç´¹ä»ãã¾ããã
ç°¡åã«ãå®è¡ç°å¢ãæ´ãããã¨ãã§ããã®ã§ãAnacondaã®ä»£æ¿åã¨ãã¦ã¯åå足ãããã¨æã£ã¦ãã¾ãã
ç¹ã«åå¿è
ã®æ¹ã«ã¯å¿
è¦ãªç°å¢ãããã«æã£ã¦ããã®ã§ããããã§ãã
å人çã«ã¯ãæè¿ã®Anacondaã¯ä¸è¦ãªã©ã¤ãã©ãªããã½ããã¦ã§ã¢ãå¤ããåããã¥ããã容éãé£ãã®ã§ä»£æ¿åãè¦ã¤ãã£ã¦ããã£ãã§ãã
ãã¾ãï¼streamlit ã®æ¹ãå¯è¦åæ©è½ã¯åªç§
jupyterã¯ã³ã¼ãã£ã³ã°ã¨ãã¼ã¿ã®å¯è¦åãã§ãã¦æ¬å½ã«ä¾¿å©ãªã®ã§ããã
ããã¼ã¿ã®å¯è¦åãã ãã«ãã©ã¼ã«ã¹ãå½ã¦ãã¨å°ã
使ãæ¹ãé£ãããã§ãããã
éã¨ã³ã¸ãã¢ã«ãã¼ã¿ãè¦ãããã触ã£ã¦ããããªããã¿ã¦ãããã«ã¯å°ãããã°ã©ãã³ã°æè¡ãå¿
é ãªã®ã§å°ãä¸ä¾¿ã«æãã¾ãã
ããããã¨ãã¯ãç§ã¯ãstream litã§ãã¼ã¿ãã¥ã¼ã¢ã¼ã¢ããªãä½æãã¦ããã©ã¦ã¶ããè¦ããä»çµã¿ãæ§ç¯ãã¦ã¾ãã
ä¸ã®è¨äºãåèã«ãã¦ãã ããã¨å¬ããã§ãã
xinformation.hatenadiary.com