teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

2

2018/09/27 05:41

投稿

tiitoi
tiitoi

スコア21960

answer CHANGED
@@ -7,4 +7,119 @@
7
7
  ```
8
8
 
9
9
  anaconda のインストールパスは環境によって変わるので調べてください。
10
- なにも指定しない場合は /opt 以下だったような気がします。
10
+ なにも指定しない場合は /opt 以下だったような気がします。
11
+
12
+ ## Ubuntu 16.04 で再現した手順
13
+
14
+ Docker 上のまっさらな Ubuntu 16.04 環境に Miniconda をインストールした手順です。
15
+
16
+ 必要なプログラムを入れる。
17
+ ```
18
+ $ apt-get update
19
+ $ apt-get install -y wget bzip2
20
+ ```
21
+
22
+ Miniconda をダウンロードし、インストールする。
23
+ ```
24
+ $ wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
25
+ $ bash Miniconda3-latest-Linux-x86_64.sh
26
+ Welcome to Miniconda3 4.5.11
27
+
28
+ In order to continue the installation process, please review the license
29
+ agreement.
30
+ Please, press ENTER to continue
31
+ >>>
32
+ ```
33
+
34
+ Enter キーを押すと利用規約が表示さます。
35
+
36
+ ```
37
+ Do you accept the license terms? [yes|no]
38
+ [no] >>> Please answer 'yes' or 'no':'
39
+ >>> yes
40
+ ```
41
+
42
+ 一番下までスクロールし、yes を入力し、Enter を押します。
43
+
44
+ ```
45
+ Miniconda3 will now be installed into this location:
46
+ /root/miniconda3
47
+
48
+ - Press ENTER to confirm the location
49
+ - Press CTRL-C to abort the installation
50
+ - Or specify a different location below
51
+ ```
52
+
53
+ ここにインストール先のディレクトリが表示されています。(この例では、`/root/miniconda3`)
54
+ 環境によって違うので、確認してください。
55
+ Enter キーを押し、インストールを続行します。
56
+
57
+ ```
58
+ PREFIX=/root/miniconda3
59
+ installing: python-3.7.0-hc3d631a_0 ...
60
+ Python 3.7.0 (default, Jun 28 2018, 13:15:42)
61
+ [GCC 7.2.0]
62
+ installing: ca-certificates-2018.03.07-0 ...
63
+ installing: conda-env-2.6.0-1 ...
64
+ installing: libgcc-ng-8.2.0-hdf63c60_1 ...
65
+ installing: libstdcxx-ng-8.2.0-hdf63c60_1 ...
66
+ installing: libffi-3.2.1-hd88cf55_4 ...
67
+ installing: ncurses-6.1-hf484d3e_0 ...
68
+ installing: openssl-1.0.2p-h14c3975_0 ...
69
+ installing: xz-5.2.4-h14c3975_4 ...
70
+ installing: yaml-0.1.7-had09818_2 ...
71
+ installing: zlib-1.2.11-ha838bed_2 ...
72
+ installing: libedit-3.1.20170329-h6b74fdf_2 ...
73
+ installing: readline-7.0-h7b6447c_5 ...
74
+ installing: tk-8.6.8-hbc83047_0 ...
75
+ installing: sqlite-3.24.0-h84994c4_0 ...
76
+ installing: asn1crypto-0.24.0-py37_0 ...
77
+ installing: certifi-2018.8.24-py37_1 ...
78
+ installing: chardet-3.0.4-py37_1 ...
79
+ installing: idna-2.7-py37_0 ...
80
+ installing: pycosat-0.6.3-py37h14c3975_0 ...
81
+ installing: pycparser-2.18-py37_1 ...
82
+ installing: pysocks-1.6.8-py37_0 ...
83
+ installing: ruamel_yaml-0.15.46-py37h14c3975_0 ...
84
+ installing: six-1.11.0-py37_1 ...
85
+ installing: cffi-1.11.5-py37he75722e_1 ...
86
+ installing: setuptools-40.2.0-py37_0 ...
87
+ installing: cryptography-2.3.1-py37hc365091_0 ...
88
+ installing: wheel-0.31.1-py37_0 ...
89
+ installing: pip-10.0.1-py37_0 ...
90
+ installing: pyopenssl-18.0.0-py37_0 ...
91
+ installing: urllib3-1.23-py37_0 ...
92
+ installing: requests-2.19.1-py37_0 ...
93
+ installing: conda-4.5.11-py37_0 ...
94
+ installation finished.
95
+ Do you wish the installer to prepend the Miniconda3 install location
96
+ to PATH in your /root/.bashrc ? [yes|no]
97
+ [no] >>> yes
98
+ ```
99
+
100
+ PATH 環境変更に追加するか聞かれるので、yes を入力し、Enter キーを押します。
101
+
102
+ ```
103
+ You may wish to edit your .bashrc to prepend the Miniconda3 install location to PATH:
104
+
105
+ export PATH=/root/miniconda3/bin:$PATH
106
+
107
+ Thank you for installing Miniconda3!
108
+ ```
109
+
110
+
111
+ .bashrc を見ると、追加されている。
112
+
113
+ ```
114
+ export PATH="/root/miniconda3/bin:$PATH"
115
+ ```
116
+
117
+ これでインストールが完了です。
118
+
119
+ ```
120
+ $ source ~/.bashrc
121
+ $ which conda
122
+ /root/miniconda3/bin/conda
123
+ ```
124
+
125
+ これで conda や pip コマンドが使えることが確認できました。

1

a

2018/09/27 05:41

投稿

tiitoi
tiitoi

スコア21960

answer CHANGED
@@ -1,1 +1,10 @@
1
- anaconda をインストールした場所を .bashrc で PATH 環境変数に追加してください
1
+ anaconda をインストールした場所を ~/.bashrc で PATH 環境変数に追加してください
2
+
3
+ ~/.bashrc
4
+
5
+ ```
6
+ export PATH="<anaconda のインストールパス>/bin:$PATH"
7
+ ```
8
+
9
+ anaconda のインストールパスは環境によって変わるので調べてください。
10
+ なにも指定しない場合は /opt 以下だったような気がします。