Ubuntu Desktop 18.04 LTSにPython環境(Anaconda)をインストールする!

Ubuntu 18.04 LTS Desktopに、データサイエンス用のpython環境を構築するため、Anacondaをインストールします。

使用した環境

  • Core i5-7500
  • GeForce GTX 1050 Ti
  • Ubuntu 18.04 LTS Desktop (18.04.3)
  • CUDA 10.1
  • cuDNN 7.6.5
  • Anaconda 2020.02 (Python 3.7)

Anaconda 2020.02のダウンロード

Anacondaのダウンロードページ「Download Anaconda Distribution」から、python 3.7バージョンのAnacondaをダウンロードします。

Anaconda 2020.02のインストールの実行

以下は、Anaconda 2020.02の場合の例になります。ダウンロードしたファイルを以下のコマンドで実行して、Anaconda 2020.02をインストールします。途中、ライセンスへの同意など聞かれますが、以下の通り、Enterあるいは"yes"で答えてインストールを行います。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$ bash ~/Downloads/Anaconda3-2020.02-Linux-x86_64.sh
...
Welcome to Anaconda3 2020.02
 
In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>
...
Do you accept the license terms? [yes|no]
[no] >>> yes
 
Anaconda3 will now be installed into this location:
/home/sysadm01/anaconda3
 
  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below
 
[/home/sysadm01/anaconda3] >>>
...
Do you wish the installer to initialize Anaconda3
by running conda init? [yes|no]
[no] >>> yes
...
Thank you for installing Anaconda3!
 
===========================================================================
 
Anaconda and JetBrains are working together to bring you Anaconda-powered
environments tightly integrated in the PyCharm IDE.
 
PyCharm for Anaconda is available at:

Anaconda 2020.02のインストールの検証

Anacondaのナビゲータが起動することを確認します。

1
2
$ source ~/.bashrc
$ anaconda-navigator

おわりに

本稿では、Anaconda 2020.02をインストールして、データサイエンスで使用するPython環境をセットアップしましt。

参考情報

関連記事