PCが新しくなったので、Pythonをインストールする。
目的は、機械学習を学ぶため。
せっかくWSLを導入したので、使ってみることにしよう。
ようやくWSLを試す時が来たのだ・・・!(歓喜)
Python3のインストール
Pythonは2系と3系があるが、今回は3系をインストールする
※pipについては、こちらの記事を参照
cataws ~ % brew install python3 # Python3のインストール cataws ~ % python3 --version # Python3のバージョン確認 Python 3.8.5 cataws ~ % pip3 -V # pipのバージョン確認 pip 21.1.1 from /home/linuxbrew/.linuxbrew/opt/python@3.9/lib/python3.9/site-packages/pip (python 3.9)
ライブラリを色々インストールする
とりあえずよく使いそうなライブラリをじゃんじゃんインストールする
cataws ~ % pip3 install numpy # numpy : 線形 cataws ~ % pip3 install scipy # scipy : 数式の処理 cataws ~ % pip3 install matplotlib # matplotlib : グラフなどの描画 cataws ~ % pip3 install pandas # pandas : データの操作 cataws ~ % pip3 install scikit-learn # scikit-learn : 機械学習用ライブラリ cataws ~ % pip3 install chainer # chainer : ディープラーニング(NN)用ライブラリ
Jupyter notebookのインストール
まあ、ぶっちゃけJupyter notebookだろうが、Google colaboratory だろうがどっちでもいいんだけど、とりあえずJupyter notebookをインストールしておく
cataws ~ % pip3 install jupyter
とりあえず、このくらいでいいかな。