{"id":300,"date":"2018-12-26T12:43:55","date_gmt":"2018-12-26T03:43:55","guid":{"rendered":"http:\/\/int-info.com\/?page_id=300"},"modified":"2023-01-25T12:24:38","modified_gmt":"2023-01-25T03:24:38","slug":"env","status":"publish","type":"page","link":"http:\/\/int-info.com\/index.php\/env\/","title":{"rendered":"\u74b0\u5883\u69cb\u7bc9"},"content":{"rendered":"<h4>2023\u5e741\u6708\u306b\u8cfc\u5165\u3057\u305fM2 mac\u3067\u306epy\u74b0\u5883\u69cb\u7bc9<\/h4>\n<p>homebrew\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<pre>\r\n\/bin\/bash -c \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/HEAD\/install.sh)\"\r\n<\/pre>\n<p>\u30d1\u30b9\u3092zsh\u3067\u901a\u3059\u3002<\/p>\n<pre>\r\necho '# Set PATH, MANPATH, etc., for Homebrew.' >> \/Users\/xxxx\/.zprofile       \r\necho 'eval \"$(\/opt\/homebrew\/bin\/brew shellenv)\"' >> \/Users\/omae3\/.zprofile                     \r\neval \"$(\/opt\/homebrew\/bin\/brew shellenv)\"\r\nsource ~\/.zprofile # \u8a2d\u5b9a\u3092\u30ed\u30fc\u30c9\r\n<\/pre>\n<p>\u4ee5\u4e0b\u3067\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u51fa\u308c\u3070ok<\/p>\n<pre>\r\nbrew -v\r\nbrew install wget # \u3088\u304f\u4f7f\u3046\u306e\u3067inst.\r\n<\/pre>\n<p>pyenv\u5916\u306epy\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff1a<br \/>\nbrew install python3<br \/>\npython3 &#8211;version # \u306a\u3093\u304b\u6570\u5b57\u304c\u51fa\u308c\u3070\u6210\u529f<\/p>\n<p>pyenv\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff1a<br \/>\nbrew install pyenv # pyenv\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\necho &#8216;export PYENV_ROOT=&#8221;$HOME\/.pyenv&#8221;&#8216; >> ~\/.zshrc # \u30d1\u30b9<br \/>\necho &#8216;export PATH=&#8221;$PYENV_ROOT\/shims:$PATH&#8221;&#8216; >> ~\/.zshrc # \u30d1\u30b9<br \/>\necho -e &#8216;if command -v pyenv 1>\/dev\/null 2>&1; then\\n  eval &#8220;$(pyenv init -)&#8221;\\nfi&#8217; >> ~\/.zshrc # \u30d1\u30b9<br \/>\nsource ~\/.zshrc # \u6709\u52b9\u5316<br \/>\npyenv install &#8211;list # py\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u53ef\u80fd\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u898b\u308b<br \/>\npyenv install 3.9.5 # py\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff083.8.9\u306a\u3069\u53e4\u3044\u3068\u30a8\u30e9\u30fc\u304c\u3067\u308b\u6a21\u69d8\uff09<br \/>\npyenv global 3.9.5 # \u4f7f\u7528\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u5909\u66f4\uff08\u521d\u671f\u306fenv\u5916\u306epy\uff09<br \/>\npyenv versions # 3.9.5\u306b*\u304c\u3042\u308c\u3070\u6210\u529f<br \/>\npython3 &#8211;version # 3.9.5\u3068\u51fa\u308c\u3070\u6210\u529f\u3002\u51fa\u306a\u3044\u5834\u5408 -> \u3061\u3083\u3093\u3068env\u306epath\u306e\u901a\u3057\u305f\uff1f<\/p>\n<p>jupyter\u3068pyenv\u306e\u9023\u643a\uff1a<br \/>\n\u30a8\u30c7\u30a3\u30bf\u3067py\u306e\u30d1\u30b9\u3092\u898b\u3066\u3001jup\u4e0a\u30673.9.5\u304c\u51fa\u308c\u3070ok\uff08memo: \u524d\u306fpyenv\u3068\u9023\u643a\u304c\u3046\u307e\u304f\u3044\u304b\u306a\u304b\u3063\u305f\u304c\u4f55\u3082\u3057\u306a\u304f\u3066\u3082\u81ea\u52d5\u3067\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u5909\u308f\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002\u975e\u5e38\u306b\u826f\u3044\u30023.9.7\u306e3.9.5\u306e\u5165\u308c\u66ff\u3048\u3067\u30c1\u30a7\u30c3\u30af\u6e08\u307f\uff09<br \/>\npip3 install jupyter<br \/>\nJupyter notebook<br \/>\nimport sys # jup.\u4e0a\u3067<br \/>\nsys.path # jup.\u4e0a\u3067<\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff1a<br \/>\npip3 install numpy<br \/>\npip3 install numpy\uff08\u79d1\u5b66\u6280\u8853\u7528\u306e\u30c7\u30fc\u30bf\u5229\u7528\uff09<br \/>\npip3 install scikit-learn\uff08\u6a5f\u68b0\u5b66\u7fd2\u306e\u95a2\u6570\u591a\u3057\uff09<br \/>\npip3 install matplotlib\uff08\u30b0\u30e9\u30d5\u306e\u63cf\u753b\uff09<br \/>\npip3 install scipy\uff08\u7d71\u8a08\u306e\u95a2\u6570\u591a\u3057\uff09<br \/>\npip3 install pydotplus (\u6c7a\u5b9a\u6728\u53ef\u8996\u5316)<br \/>\nbrew install graphviz\uff08\u6c7a\u5b9a\u6728\u306e\u53ef\u8996\u5316\u306e\u305f\u3081\u306b\uff09<br \/>\nbrew install ffmpeg\uff08matplot\u306e\u52d5\u753b\u5316\u306b\u5fc5\u8981\uff09<br \/>\npip3 install graphviz\uff08\u6709\u5411\u7121\u5411\u30b0\u30e9\u30d5\uff09<br \/>\npip3 install semopy\uff08\u5171\u5206\u6563\u69cb\u9020\u5206\u6790\uff09<br \/>\npip3 install opencv-python<br \/>\npip3 install tqdm<\/p>\n<p>\u4ee5\u4e0b\u306f\u30a8\u30e9\u30fc\u304c\u51fa\u305f\u304c\u3001mac\u3067\u306f\u3084\u3089\u306a\u3044\u304b\u3089\u3068\u308a\u3042\u3048\u305a\u653e\u7f6e<br \/>\npip3 install mecab-python3<br \/>\npip3 install tensorflow<\/p>\n<hr>\n<p>\u3053\u3053\u304b\u3089\u65e7\u8cc7\u6599\uff08\u301c2019\uff09<\/p>\n<h4 style=\"padding: 0.1em 0.3em; border-left: 10px solid #1E88E5; border-bottom: 3px solid #B0BEC5;\"> \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb <\/h4>\n<p>HomeBrew\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff1a<br \/>\nMacOSX\u306b\u5bfe\u3057\u3001\u8272\u3005\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3059\u308b\u3053\u3068\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre>\r\n\/usr\/bin\/ruby -e \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/master\/install)\"\r\n<\/pre>\n<p><font color=\"red\">\u3082\u3057\u3053\u308c\u3067brew\u30b3\u30de\u30f3\u30c9\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3089\u306a\u3044\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3064\u3002<\/font><\/p>\n<pre>xcode-select --install<\/pre>\n<p><!--\n\n\n<ul>\n\n\n<li>app store\u304b\u3089Xcode\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001Xcode\u3092\u958b\u304f\u3002\u3053\u308c\u3067\u300cagree\u300d\u3092\u9078\u629e\u3059\u308b\u3002<\/li>\n\n\n\n\n<li><a href=\"https:\/\/developer.apple.com\/download\/more\/\">https:\/\/developer.apple.com\/download\/more\/<\/a>\u3078\u884c\u304d\u3001\u300cCommand Line Tools for Xcode 11 Beta\u300d\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3057\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/li>\n\n\n<\/ul>\n\n\n\u305d\u306e\u5f8c\u3001\u518d\u5ea6\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3059\u308b\u3002\n\/usr\/bin\/ruby -e \"$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebrew\/install\/master\/install)\"\n--><\/p>\n<p><\/br><br \/>\nwget\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff1a<br \/>\nWeb\u304b\u3089\u30d5\u30a1\u30a4\u30eb\u3092\u53d6\u5f97\u3059\u308b\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u304b\u3089\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3066\u3070ok\u3067\u3059\u3002<br \/>\nbrew install wget<br \/>\n<\/br><\/p>\n<p>python3\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff1a<br \/>\nbrew install python3<br \/>\n<\/br><\/p>\n<p>\u7d71\u8a08\u30fb\u6a5f\u68b0\u5b66\u7fd2\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff1a<br \/>\npip3\u3068\u306f\u3001python3\u74b0\u5883\u306b\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u5165\u308c\u308b\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002\u4ee5\u4e0b\u306e\u901a\u308a\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre>\r\n\r\n\u30a8\u30c7\u30a3\u30bf\uff1a\r\npip3 install jupyter\uff08\u30a8\u30c7\u30a3\u30bf\uff09\r\n\r\n\u6a5f\u68b0\u5b66\u7fd2\u30fb\u7d71\u8a08\u5b66\u5468\u308a\uff1a\r\npip3 install numpy\uff08\u79d1\u5b66\u6280\u8853\u7528\u306e\u30c7\u30fc\u30bf\u5229\u7528\uff09\r\npip3 install scikit-learn\uff08\u6a5f\u68b0\u5b66\u7fd2\u306e\u95a2\u6570\u591a\u3057\uff09\r\npip3 install matplotlib\uff08\u30b0\u30e9\u30d5\u306e\u63cf\u753b\uff09\r\npip3 install scipy\uff08\u7d71\u8a08\u306e\u95a2\u6570\u591a\u3057\uff09\r\npip3 install pydotplus (\u6c7a\u5b9a\u6728\u53ef\u8996\u5316)\r\nbrew install graphviz\uff08\u6c7a\u5b9a\u6728\u306e\u53ef\u8996\u5316\u306e\u305f\u3081\u306b\uff09\r\nbrew install ffmpeg\uff08matplot\u306e\u52d5\u753b\u5316\u306b\u5fc5\u8981\uff09\r\npip3 install graphviz\uff08\u6709\u5411\u7121\u5411\u30b0\u30e9\u30d5\uff09\r\npip3 install semopy\uff08\u5171\u5206\u6563\u69cb\u9020\u5206\u6790\uff09\r\n\r\n\u6df1\u5c64\u5b66\u7fd2:\r\npip3 install tensorflow\r\npip3 install plaidml-keras plaidbench\r\n-> memo: \u3053\u308c\u3067keras\u3082\u306f\u3044\u308b\u3002\u306a\u304a\u3001\u5fc5\u305a\u3001plaidml-keras\u3092\u3001tensorflow\u3088\u308a\u3082\u524d\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u3002\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u304c\u66f8\u304d\u63db\u3048\u3089\u308c\u306a\u304f\u306a\u308a\u307e\u3059\u3002\u3068\u3044\u3046\u304b\uff1ftensorflow\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u3044\u3089\u306a\u3044\uff1f\u672a\u691c\u8a3c\u3002\r\n\u4ee5\u4e0b\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u63a8\u5968\u3057\u307e\u3059\u3002\r\ntensorflow: 2.3.0\r\nplaidml-keras: 0.7.0 \r\n\r\n\u81ea\u7136\u8a00\u8a9e\u51e6\u7406\uff1a\r\npip3 install mecab-python3\uff08\u5f62\u614b\u7d20\u89e3\u6790\uff09\r\npip3 install gensim\uff08word2vec\uff09\r\n\r\n\u753b\u50cf\u51e6\u7406:\r\npip3 install opencv-python\r\n\r\n\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3057\u305f\u3044\u5834\u5408\uff1a\r\npip3 install beautifulsoup4\uff08\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u30e9\u30a4\u30d6\u30e9\u30ea\uff09\r\npip3 install requests\uff08web\u63a5\u7d9a\u30e9\u30a4\u30d6\u30e9\u30ea\uff09\r\n\r\nWeb\u30a2\u30d7\u30ea\u958b\u767a\uff1a\r\npip3 install bottle\uff08python\u3067\u30b5\u30fc\u30d0\u3092\u7acb\u3066\u308b\uff09\r\npip3 install jinja2\uff08python+html\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\uff09\r\n\r\n\u30d0\u30fc\u30b8\u30e7\u30f3\u8868\u793a\uff1a\r\npip3 list\uff08\u5168\u90e8\u8868\u793a\uff09\r\npip3 list -o \uff08\u73fe\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u8868\u793a\uff09\r\npip3 show xxx \uff08xxx\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u8868\u793a\uff09\r\n\r\n\u30d0\u30fc\u30b8\u30e7\u30f3\u6307\u5b9a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff1a\r\npip3 install xxx==n.n.n\uff08xxx\u304c\u30a4\u30f3\u30dd\u30fc\u30c8\u540d\u3067\u3001n\u304c\u30d0\u30fc\u30b8\u30e7\u30f3\uff09\r\n\r\n\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\uff1a\r\npip3 install --upgrade xxx\r\n\r\n\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff1a\r\npip3 uninstall xxx \uff08xxx\u306b\u30d1\u30c3\u30b1\u30fc\u30b8\u6307\u5b9a\uff09\r\n\r\n<\/pre>\n<p><\/br><\/p>\n<p>\u30d0\u30fc\u30b8\u30e7\u30f3\u5099\u5fd8\u9332\uff1a<br \/>\n\u3053\u306e\u30da\u30fc\u30b8\u306e\u5b9f\u884c\u74b0\u5883\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u3001\u6b8b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\npython3: 3.7.1 (python3 &#8211;version, ter)<br \/>\njupyter: 4.4.0 (jupyter &#8211;ver, ter)<br \/>\npip3: 18.1 (pip3 &#8211;version, ter)<br \/>\nnumpy: 1.15.4 (np.__version__, py)<br \/>\nsklearn: 0.20.1 (sk.__version__, py)<br \/>\nspicy: 1.1.0 (sp.__version__, py)<br \/>\nmatplotlib: 3.0.2 (mp.__version__, py)<\/p>\n<p><\/br><\/p>\n<h4 style=\"padding: 0.1em 0.3em; border-left: 10px solid #1E88E5; border-bottom: 3px solid #B0BEC5;\"> \u30a8\u30c7\u30a3\u30bf: Jupyter\u306b\u3064\u3044\u3066 <\/h4>\n<p>\u8d77\u52d5\u65b9\u6cd5\uff1a<br \/>\n\u307e\u305a\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3001\u4f5c\u696d\u3057\u305f\u3044\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u307e\u3067\u79fb\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u4f8b\u3048\u3070\u3001Desktop\u306b\u3042\u308bPy\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u4f5c\u696d\u3057\u305f\u3044\u5834\u5408\u306b\u306f\u3001<br \/>\n<br \/>\ncd Desktop\/Py<br \/>\n<br \/>\n\u3067\u79fb\u52d5\u3057\u307e\u3059\u3002\u79fb\u52d5\u5f8c\u3001<br \/>\n<br \/>\njupyter notebook<br \/>\n<br \/>\n\u3068\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u30b3\u30de\u30f3\u30c9\u3092\u6253\u3064\u3068Jupyter notebook\u304c\u8d77\u52d5\u3057\u307e\u3059\u3002<br \/>\n\u305d\u306e\u5f8c\u3001\u53f3\u4e0a\u306e\u30bf\u30d6\u304b\u3089\u300cNew->Python3\u300d\u3068\u9078\u629e\u3059\u308c\u3070\u30a8\u30c7\u30a3\u30bf\u304c\u958b\u304d\u307e\u3059\u3002<br \/>\n\u4e0a\u306e\u65b9\u306b\u3042\u308bUntitled\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u3064\u3051\u308c\u3070\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n<p><b>\u30de\u30fc\u30af\u30c0\u30a6\u30f3\u3068\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\uff1a<\/b><br \/>\nJupyter\u306b\u306f\u3001\u30de\u30fc\u30af\u30c0\u30a6\u30f3\u3001\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3001\uff12\u3064\u306e\u30e2\u30fc\u30c9\u304c\u3042\u308a\u307e\u3059\u3002\u30a8\u30c7\u30a3\u30bf\u306e\u5de6\u5074\u306b\u300cIn[]\u300d\u3068\u3064\u3044\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3067\u3059\u3002\u3064\u3044\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u30de\u30fc\u30af\u30c0\u30a6\u30f3\u3068\u306a\u308a\u307e\u3059\u3002\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30e2\u30fc\u30c9\u3067\u306f\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002\u30de\u30fc\u30af\u30c0\u30a6\u30f3\u3067\u306f\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u8aac\u660e\u306a\u3069\u3092\u66f8\u304f\u6587\u5b57\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002\u30de\u30fc\u30af\u30c0\u30a6\u30f3\u3067\u8aac\u660e\u3092\u66f8\u304d\u3001\u305d\u306e\u4e0b\u306b\u3001\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3059\u308b\u3001\u3068\u3044\u3046\u306e\u304c\u4e00\u822c\u7684\u306a\u4f7f\u3044\u65b9\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><b>jupyter\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30b3\u30de\u30f3\u30c9\uff1a<\/b><br \/>\n\u305f\u304f\u3055\u3093\u3042\u308b\u306e\u3067\u3001\u6700\u4f4e\u9650\u4f7f\u3046\u3082\u306e\u3060\u3051\u8a18\u8f09\u3057\u307e\u3059\u3002mac OS X\u306e\u5834\u5408\u3067\u3059\u3002<\/p>\n<p>esc + y: \u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30e2\u30fc\u30c9\u306b\u30c1\u30a7\u30f3\u30b8<br \/>\nesc + m: \u30de\u30fc\u30af\u30c0\u30a6\u30f3\u30e2\u30fc\u30c9\u306b\u30c1\u30a7\u30f3\u30b8<br \/>\nesc + a: \u73fe\u5728\u306e\u30bb\u30eb\u306e\u4e0a\u306b\u30bb\u30eb\u3092\u8ffd\u52a0<br \/>\nesc + b: \u73fe\u5728\u306e\u30bb\u30eb\u306e\u4e0b\u306b\u30bb\u30eb\u3092\u8ffd\u52a0<br \/>\nesc + dd: \u8a72\u5f53\u30bb\u30eb\u3092\u524a\u9664\uff08d\u30922\u56de\u9023\u6253\uff09<br \/>\nesc + z: \u5143\u306b\u623b\u3059\uff08\u30bb\u30eb\u3092\u8aa4\u3063\u3066\u6d88\u3057\u305f\u3068\u304d\u306a\u3069\uff09<br \/>\nsift + enter: \u305d\u306e\u30bb\u30eb\u3092\u5b9f\u884c<br \/>\ncommand + s: \u4e0a\u66f8\u304d\u4fdd\u5b58<\/p>\n<p><b>\u305d\u306e\u4ed6\u4fbf\u5229\u6280\uff1a<\/b><br \/>\n\u8907\u6570\u884c\u9078\u629e + tab: \u4e00\u62ec\u30a4\u30f3\u30c7\u30f3\u30c8<br \/>\n\u8907\u6570\u884c\u9078\u629e + shift + tab: \u4e00\u62ec\u30a4\u30f3\u30c7\u30f3\u30c8 (\u623b\u3059)<br \/>\n\u8907\u6570\u884c\u9078\u629e + command + \/: \u4e00\u62ec\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\uff08\u3082\u3046\u4e00\u56de\u3067\u623b\u3059\uff09 <\/p>\n<p><b>\u7279\u6b8a\u306a\u4fdd\u5b58\uff1a<\/b><br \/>\n\u300cfile -> download as\u300d\u3092\u9078\u629e\u3059\u308b\u3068\u3001\u300c.py\u300d\u3084\u300c.html\u300d\u3067\u4fdd\u5b58\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4f5c\u3063\u305f\u30b3\u30fc\u30c9\u3092\u3069\u3053\u304b\u306b\u5b9f\u88c5\u3057\u305f\u3044\u5834\u5408\u306b\u306f\u300c.py\u300d\u3001web\u30b3\u30f3\u30c6\u30f3\u30c4\u3068\u3057\u3066\u516c\u958b\u3057\u305f\u3044\u5834\u5408\u306b\u306f\u300c.html\u300d\u3067\u4fdd\u5b58\u3059\u308b\u3068\u3044\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u306a\u304a\u3001\u300c.html\u300d\u3067\u4fdd\u5b58\u3059\u308b\u3068\u3001\u9759\u7684\u306a\u30b3\u30f3\u30c6\u30f3\u30c4\u306b\u306a\u308b\u306e\u3067\u3001\u5b9f\u884c\u306a\u3069\u306f\u3067\u304d\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><b>\u30bf\u30fc\u30df\u30ca\u30eb\u306eJupyter\u3092\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3\uff1a<\/b><br \/>\nJupyter\u306f\u30b5\u30fc\u30d0\u3068\u3057\u3066\u8d77\u52d5\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u30b5\u30fc\u30d0\u3092\u505c\u6b62\u3059\u308b\u306b\u306f\u3001\u300ccontrol+c\u300d\u3092\u62bc\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u300ccommand+c\u300d\u3067\u306f\u306a\u3044\u306e\u3067\u6ce8\u610f\u3059\u308b\u3053\u3068\u3002<\/p>\n<p><\/br><\/p>\n<h4 style=\"padding: 0.1em 0.3em; border-left: 10px solid #1E88E5; border-bottom: 3px solid #B0BEC5;\"> Pyenv\u74b0\u5883\u8a2d\u5b9a <\/h4>\n<p>\u610f\u56f3\u305b\u306c\u8b0e\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3067python\u304c\u52d5\u304b\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u306e\u3092\u9632\u3050\u65b9\u6cd5<\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb:<\/p>\n<pre>\r\nbrew install pyenv\r\n<\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u53ef\u80fd\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u4e00\u89a7:<\/p>\n<pre>\r\npyenv install --list\r\n<\/pre>\n<p>\u6307\u5b9a\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff08\u4f8b\u3048\u3070\u3001python 3.7.1\uff09:<br \/>\n\uff08\u8907\u6570\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3082ok\uff09<\/p>\n<pre>\r\npyenv install 3.7.1\r\n<\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6e08\u307f\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u53d6\u5f97:<\/p>\n<pre>\r\npyenv versions\r\n<\/pre>\n<p>\u4f7f\u3046\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u5909\u66f4:<br \/>\n\u3000\u2192 1\u884c\u76ee\u306f\u4f7f\u3046\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u8a2d\u5b9a\u3067\u30012, 3\u884c\u76ee\u306f\u305d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u306a\u3063\u3066\u3044\u308b\u304b\u30c1\u30a7\u30c3\u30af\u3059\u308b\u30b3\u30de\u30f3\u30c9\u3002\u4e00\u81f4\u3057\u306a\u3051\u308c\u3070\u3001\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u3078\u3002<\/p>\n<pre>\r\npyenv global 3.7.1\r\npython --version\r\npip3 --version\r\n<\/pre>\n<p>\u305d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067jupyter\u306a\u3069\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb:<br \/>\n\u3000\u2192\u4e0a\u3067\u8a2d\u5b9a\u3057\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306e\u307f\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\n<pre>\r\npip3 install jupyter\r\npip3 install numpy\r\n...\r\n<\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305fimport\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308b\u304b\u30c1\u30a7\u30c3\u30af:<br \/>\n\u3000\u2192\u4f8b\u3048\u3070\u3001python 3.7.1\u306e\u5834\u5408<\/p>\n<pre>\r\ncd \/Users\/xxxx\/.pyenv\/versions\/3.7.1\/lib\/python3.7\/site-packages\r\n<\/pre>\n<p>Jupyter\u306b\u30ab\u30fc\u30cd\u30eb\u8ffd\u52a0\uff1a<br \/>\n\u3000\u2192\u4f8b\u3048\u3070\u3001python 3.7.1\u306e\u5834\u5408<\/p>\n<pre>\r\npython -m ipykernel install --user --name=python3.7.1 --display-name=python3.7.1\r\n<\/pre>\n<p>\u3053\u308c\u3067\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f\u3068\u304d\u306b\u3001\u30ab\u30fc\u30cd\u30eb\u3092\u9078\u629e\u3067\u304d\u308b\u3002<\/p>\n<p><\/br><\/p>\n<h4 style=\"padding: 0.1em 0.3em; border-left: 10px solid #1E88E5; border-bottom: 3px solid #B0BEC5;\"> Pyenv\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0 <\/h4>\n<p><b>pyenv global \u3068 python \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u5408\u308f\u306a\u3044\uff1a<\/b><br \/>\n\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u4ee5\u4e0b\u3092\u305f\u305f\u304f\u3002<\/p>\n<pre>\r\neval \"$(pyenv init -)\"\r\n<\/pre>\n<p><b>jupyter\u30673.7.1\u30ab\u30fc\u30cd\u30eb\u3092\u9078\u3093\u3067\u3044\u308b\u306e\u306b\u30013.8.1\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u304c\u4f7f\u308f\u308c\u3066\u3057\u307e\u3046\u3002<\/b><br \/>\njupyter\u3067\u3001<\/p>\n<pre>\r\nimport sys\r\nsys.path\r\n<\/pre>\n<p>\u3053\u308c\u3067\u3001\u5bfe\u8c61\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u306a\u3063\u3066\u3044\u308c\u3070ok\u3002\u4f8b\u3048\u3070\u3001\u30ab\u30fc\u30cd\u30eb\u30673.7.1\u3068\u8a2d\u5b9a\u3057\u3066\u3044\u308c\u3070\u3001\u3053\u3053\u3067\u30823.7.1\u304c\u304b\u3048\u3063\u3066\u304f\u308b\u3002\u3082\u3057\u610f\u56f3\u3057\u306a\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u51fa\u3066\u304f\u308b\u306a\u3089\u3001pip3\u3067\u5165\u308c\u305f\u305d\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u4f7f\u3048\u306a\u304f\u306a\u308b\u3002\u3053\u306e\u5834\u5408\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u3001<\/p>\n<pre>\r\njupyter kernelspec list\r\n<\/pre>\n<p>\u3068\u6253\u3061\u8fbc\u307f\u3001\u5bfe\u8c61\u30ab\u30fc\u30cd\u30eb\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u3001vim\u3067.json\u3092\u958b\u304f\u3002\u3053\u3053\u306b\u3001\u5bfe\u8c61\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u304b\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3002\u30ab\u30fc\u30cd\u30eb\u304c3.6.1\u306a\u306e\u306b\u3001json\u3067\u306f3.7.1\u306b\u306a\u3063\u3066\u3044\u308b\u306a\u3069\u304c\u3042\u308c\u3070\u3001\u4fee\u6b63\u3059\u308b\u3002\u304a\u304b\u3057\u3044\u3082\u306e\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u524a\u9664\u3059\u308b\u3002<\/p>\n<pre>\r\njupyter kernelspec uninstall pythonx.x.x\r\n<\/pre>\n<p>memo:<br \/>\n\u3057\u3070\u3089\u304f\u306f3.7.1\u3067\u3084\u308b\u4e88\u5b9a\uff082020.8\uff09<\/p>\n<p><\/br><\/p>\n<h4 style=\"padding: 0.1em 0.3em; border-left: 10px solid #1E88E5; border-bottom: 3px solid #B0BEC5;\"> PYTHONPATH\u306e\u6c38\u7d9a\u7684\u306a\u6307\u5b9a <\/h4>\n<pre>\r\npython3\r\nimport sys\r\nsys.path\r\n<\/pre>\n<p>\u3092\u5165\u308c\u308b\u3068\u3001python\u304cload\u3057\u3066\u304f\u308c\u308b\u30d1\u30b9\u4e00\u89a7\u304c\u8868\u793a\u3055\u308c\u308b\u3002\u305f\u3060\u3001\u3053\u306e\u4e2d\u306b\u8aad\u3093\u3067\u307b\u3057\u3044\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u304c\u3042\u308b\u3002\u3053\u306e\u5834\u5408\u306f\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u3067\u3001<\/p>\n<pre>\r\nexport PYTHONPATH=\"\/xxx\/xxx\/xxx\"\r\n<\/pre>\n<p>\u3068\u6307\u5b9a\u3059\u308c\u3070\u826f\u3044\u3002\u3059\u308b\u3068\u3001export\u3092\u5165\u529b\u3057\u3066\u3082\u3001sys.path\u3067\u3082\u3001\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u308b\u304c\u8868\u793a\u3055\u308c\u308b\u3002\u3067\u3082\u3001\u3053\u308c\u3060\u3068\u6bce\u56de\u5165\u529b\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002export\u30b3\u30de\u30f3\u30c9\u3092\u6c38\u7d9a\u7684\u306b\u3057\u305f\u3044\u5834\u5408\u306f\u3001<\/p>\n<pre>\r\nvim ~\/.bash_profile\r\n<\/pre>\n<p>\u3068\u6253\u3061\u8fbc\u3080\u3002\u300c~\/\u300d\u306fhome\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u610f\u5473\u3059\u308b\u3002home\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f\u3001export\u30b3\u30de\u30f3\u30c9\u3067\u898b\u308b\u3068\u3001\u3069\u3053\u306b\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u304b\u30c1\u30a7\u30c3\u30af\u3067\u304d\u308b\u3002home\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u3042\u308b\u300c.bash_profile\u300d\u306f\u3001\u74b0\u5883\u5909\u6570\u3092\u6c38\u7d9a\u7684\u306b\u8a2d\u5b9a\u3067\u304d\u308b\u5834\u6240\u3092\u610f\u5473\u3059\u308b\u3002\u300c.bash_profile\u300d\u306f\u96a0\u3057\u30d5\u30a1\u30a4\u30eb\u306a\u306e\u3067\u3001ls\u30b3\u30de\u30f3\u30c9\u3067\u306f\u898b\u308c\u305a\u3001\u300cls -a\u300d\u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002\u3053\u306e\u4e2d\u306b\u3001<\/p>\n<pre>\r\nexport PYTHONPATH=\"\/xxx\/xxx\/xxx\"\r\n<\/pre>\n<p>\u3092\u66f8\u304d\u8fbc\u3093\u3067\u3001\u4fdd\u5b58\u3059\u308c\u3070ok\u3002\u30bf\u30fc\u30df\u30ca\u30eb\u3092\u8d77\u52d5\u3059\u308b\u305f\u3073\u306b\u3001\u3053\u306e\u8a2d\u5b9a\u304c\u53cd\u6620\u3055\u308c\u308b\u3002\u30bf\u30fc\u30df\u30ca\u30eb\u3092\u9589\u3058\u3066\u3001\u3082\u3046\u4e00\u5ea6\u958b\u304d\u3001export\u30b3\u30de\u30f3\u30c9\u304b\u3001sys.path\u3067\u6307\u5b9a\u3057\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u53cd\u6620\u3055\u308c\u3066\u3044\u308b\u304b\u3001\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3068\u826f\u3044\u3002<font color=\"red\">home\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b.bash_profile\u304c\u306a\u3044\u5834\u5408\u306f\u3001\u81ea\u5206\u3067\u4f5c\u3063\u3061\u3083\u3063\u3066ok<\/font><\/p>\n<p><\/br><\/p>\n<h4 style=\"padding: 0.1em 0.3em; border-left: 10px solid #1E88E5; border-bottom: 3px solid #B0BEC5;\"> Pyenv\u74b0\u5883\u8a2d\u5b9a\uff08zsc\u74b0\u5883, M1\u30c1\u30c3\u30d7\uff09 <\/h4>\n<p>\u30e1\u30e2\u66f8\u304d\u30023.7.9, 3.9.1\u3057\u304b\u5165\u3089\u306a\u3044\uff1f<\/p>\n<pre>\r\nbrew install pyenv\r\npyenv install 3.7.9\r\npyenv install 3.9.1\r\n<\/pre>\n<p>\u2192 M1\u30c1\u30c3\u30d7\u3060\u3068\u3046\u307e\u304f\u3044\u304b\u306a\u3044\uff1f<\/p>\n","protected":false},"excerpt":{"rendered":"<p>2023\u5e741\u6708\u306b\u8cfc\u5165\u3057\u305fM2 mac\u3067\u306epy\u74b0\u5883\u69cb\u7bc9 homebrew\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb \/bin\/bash -c &#8220;$(curl -fsSL https:\/\/raw.githubusercontent.com\/Homebr<\/p><\/div>\n<div class=\"blog-btn\"><a href=\"http:\/\/int-info.com\/index.php\/env\/\" class=\"home-blog-btn\">\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-300","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/pages\/300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/comments?post=300"}],"version-history":[{"count":54,"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/pages\/300\/revisions"}],"predecessor-version":[{"id":3410,"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/pages\/300\/revisions\/3410"}],"wp:attachment":[{"href":"http:\/\/int-info.com\/index.php\/wp-json\/wp\/v2\/media?parent=300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}