linuxでAnaconda 3をインストールする

1733 ワード

1.インストールパッケージのダウンロード
wget https://repo.anaconda.com/archive/Anaconda3-2018.12-Linux-x86_64.sh

2.インストールコマンドの実行
bash Anaconda3-2018.12-Linux-x86_64.sh

3.インストールパスの選択
Anaconda3 will now be installed into this location:
/root/anaconda3

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/root/anaconda3] >>> /usr/local/anaconda3

4.VSCodeをインストールするかどうかを選択し、noを入力してインストールを終了する
Do you wish to proceed with the installation of Microsoft VSCode? [yes|no]
>>> Please answer 'yes' or 'no':
>>> no

5.環境変数の構成
sudo vi /etc/profile

尾部に以下を加える
export PATH=/usr/local/anaconda3/bin:$PATH

escを押して入力:wq保存終了
最後に、環境変数を有効にするには、次のようにします.
source /etc/profile

6.インストールを検証し、次のコマンドを入力します.
 conda list

インストールに成功した結果は次のとおりです.
# packages in environment at /usr/local/anaconda3:
#
# Name                    Version                   Build  Channel
_ipyw_jlab_nb_ext_conf    0.1.0                    py37_0  
alabaster                 0.7.12                   py37_0  
anaconda                  2018.12                  py37_0  
anaconda-client           1.7.2                    py37_0  
anaconda-navigator        1.9.6                    py37_0  
anaconda-project          0.8.2                    py37_0  

 ........

7.python 3環境の作成
conda create -n python3 python=3.5 numpy pandas

8.python 3に切り替える
source activate python3