102 Pythonセットアップ@WSL¶
1. Anacondaのインストーラーのダウンロードおよび実行¶
Anaconda for Linux https://www.anaconda.com/download/#linux を入手し,実行する
bash
wget https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh
sh Anaconda3-5.0.1-Linux-x86_64.sh
2. モジュールのインストール¶
WSLからモジュールをコマンドでインストールする. ここではpython 3.6専用の環境を構築している. 新しいモジュールは,pipに来てからcondaに来る傾向がある. また,condaでもレポジトリによって提供されるモジュールの更新速度が違うので,時宜にかなったインストール方法を採用する. 最悪でもwheelを用いて自力でインストールすれば良い.
あると便利なモジュール集 certifi pip pep8 Sphinx pandas numpy scipy sympy matplotlib seaborn autograd scikit-learn control statsmodels gurobi coolprop jupyter jupyter_nbextensions_configurator jupyter_contrib_nbextensions nbsphinx ffmpeg imagemagick
bash
conda create -n py3.6 python=3.6 anaconda
conda info -e
source activate py3.6
conda update anaconda
conda config --add channels conda-forg
conda install certifi pip pep8 Sphinx
conda install pandas numpy scipy sympy matplotlib seaborn autograd scikit-learn control statsmodels
conda install -c gurobi gurobi
conda install -c bryanwweber coolprop
conda install jupyter jupyter_nbextensions_configurator jupyter_contrib_nbextensions nbsphinx
conda install -c anaconda-nb-extensions nb_conda
conda update --all
jupyter contrib nbextension install --user
jupyter nbextension enable --py --sys-prefix widgetsnbextension
jupyter nbextension enable --py gmaps