갈루아의 반서재

728x90

파이썬2 커널이 설치된 주피터 노트북에 파이썬 3 커널을 다음과 같이 추가로 설치할 수 있다. 

추가적인 내용은 아래 링크를 참조한다. 



파이썬3 커널을 다음과 같이 추가로 설치할 수 있다.

python3 -m pip install ipykernel
python3 -m ipykernel install --user


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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
root@localhost:~# source activate tensorflow
(tensorflow) root@localhost:~# jupyter --version
4.2.0
(tensorflow) root@localhost:~# python
Python 2.7.12 |Continuum Analytics, Inc.| (default, Jul  2 201617:42:40)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help""copyright""credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> exit()
(tensorflow) root@localhost:~# python3 -m pip install ipykernel
Collecting ipykernel
  Downloading ipykernel-4.6.1-py3-none-any.whl (104kB)
    100|████████████████████████████████| 112kB 565kB/s
Collecting jupyter-client (from ipykernel)
  Downloading jupyter_client-5.1.0-py2.py3-none-any.whl (84kB)
    100|████████████████████████████████| 92kB 3.5MB/s
Collecting ipython>=4.0.0 (from ipykernel)
  Downloading ipython-6.2.0-py3-none-any.whl (745kB)
    100|████████████████████████████████| 747kB 1.4MB/s
Collecting tornado>=4.0 (from ipykernel)
  Downloading tornado-4.5.2.tar.gz (483kB)
    100|████████████████████████████████| 491kB 2.1MB/s
Collecting traitlets>=4.1.0 (from ipykernel)
  Downloading traitlets-4.3.2-py2.py3-none-any.whl (74kB)
    100|████████████████████████████████| 81kB 5.5MB/s
Collecting pyzmq>=13 (from jupyter-client->ipykernel)
  Downloading pyzmq-16.0.2-cp34-cp34m-manylinux1_x86_64.whl (3.1MB)
    100|████████████████████████████████| 3.1MB 320kB/s
Collecting jupyter-core (from jupyter-client->ipykernel)
  Downloading jupyter_core-4.3.0-py2.py3-none-any.whl (76kB)
    100|████████████████████████████████| 81kB 1.3MB/s
Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.4/dist-packages (from jupyter-client->ipykernel)
Collecting simplegeneric>0.8 (from ipython>=4.0.0->ipykernel)
  Using cached simplegeneric-0.8.1.zip
Collecting jedi>=0.10 (from ipython>=4.0.0->ipykernel)
  Downloading jedi-0.11.0-py2.py3-none-any.whl (146kB)
    100|████████████████████████████████| 153kB 4.9MB/s
Collecting pygments (from ipython>=4.0.0->ipykernel)
  Downloading Pygments-2.2.0-py2.py3-none-any.whl (841kB)
    100|████████████████████████████████| 849kB 1.4MB/s
Collecting setuptools>=18.5 (from ipython>=4.0.0->ipykernel)
  Downloading setuptools-36.5.0-py2.py3-none-any.whl (478kB)
    100|████████████████████████████████| 481kB 2.3MB/s
Collecting typing; python_version <= "3.4" (from ipython>=4.0.0->ipykernel)
  Downloading typing-3.6.2-py3-none-any.whl
Collecting decorator (from ipython>=4.0.0->ipykernel)
  Using cached decorator-4.1.2-py2.py3-none-any.whl
Collecting prompt-toolkit<2.0.0,>=1.0.4 (from ipython>=4.0.0->ipykernel)
  Downloading prompt_toolkit-1.0.15-py3-none-any.whl (247kB)
    100|████████████████████████████████| 256kB 2.9MB/s
Collecting pickleshare (from ipython>=4.0.0->ipykernel)
  Using cached pickleshare-0.7.4-py2.py3-none-any.whl
Requirement already satisfied: pexpect; sys_platform != "win32" in /usr/local/lib/python3.4/dist-packages (from ipython>=4.0.0->ipykernel)
Collecting backports_abc>=0.4 (from tornado>=4.0->ipykernel)
  Downloading backports_abc-0.5-py2.py3-none-any.whl
Collecting ipython-genutils (from traitlets>=4.1.0->ipykernel)
  Downloading ipython_genutils-0.2.0-py2.py3-none-any.whl
Requirement already satisfied: six in /usr/local/lib/python3.4/dist-packages (from traitlets>=4.1.0->ipykernel)
Collecting parso==0.1.0 (from jedi>=0.10->ipython>=4.0.0->ipykernel)
  Downloading parso-0.1.0-py2.py3-none-any.whl (89kB)
    100|████████████████████████████████| 92kB 6.3MB/s
Collecting wcwidth (from prompt-toolkit<2.0.0,>=1.0.4->ipython>=4.0.0->ipykernel)
  Using cached wcwidth-0.1.7-py2.py3-none-any.whl
Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.4/dist-packages (from pexpect; sys_platform != "win32"->ipython>=4.0.0->ipykernel)
Building wheels for collected packages: tornado, simplegeneric
  Running setup.py bdist_wheel for tornado ... done
  Stored in directory: /root/.cache/pip/wheels/b3/47/3a/96e12476829cb196adabc879fedb72f1bb2c8613b6961e78e7
  Running setup.py bdist_wheel for simplegeneric ... done
  Stored in directory: /root/.cache/pip/wheels/7b/31/08/c85e74c84188cbec6a6827beec4d640f2bd78ae003dc1ec09d
Successfully built tornado simplegeneric
Installing collected packages: ipython-genutils, decorator, traitlets, pyzmq, jupyter-core, jupyter-client, simplegeneric, parso, jedi, pygments, setuptools, typing, wcwidth, prompt-toolkit, pickleshare, ipython, backports-abc, tornado, ipykernel
  Found existing installation: setuptools 3.3
    Uninstalling setuptools-3.3:
      Successfully uninstalled setuptools-3.3
  Found existing installation: tornado 3.1.1
    Uninstalling tornado-3.1.1:
      Successfully uninstalled tornado-3.1.1
Successfully installed backports-abc-0.5 decorator-4.1.2 ipykernel-4.6.1 ipython-6.2.0 ipython-genutils-0.2.0 jedi-0.11.0 jupyter-client-5.1.0 jupyter-core-4.3.0 parso-0.1.0 pickleshare-0.7.4 prompt-toolkit-1.0.15 pygments-2.2.0 pyzmq-16.0.2 setuptools-36.5.0 simplegeneric-0.8.1 tornado-4.5.2 traitlets-4.3.2 typing-3.6.2 wcwidth-0.1.7
(tensorflow) root@localhost:~# python3 -m ipykernel install --user
Installed kernelspec python3 in /root/.local/share/jupyter/kernels/python3
cs


다음과 같이 파이썬3 커널이 추가되었음을 볼 수 있다.

728x90