Data Science 분야와 과학분야에서 편하게 Python이 쓰이도록 개발된 사용된 설치환경은 아래와 같다. 실행 명령어 (개인 환경) -나의 경우 이대로 따라하면 된다- Ipython Notebook 보다 더 발전된 Interactive IDE이다. python2는 실행 방법 도움말 실행 방법 주피터의 다중 커널 개념 지원은 매우 간단하고, 강력하다. IPython이 실행되는 파이썬 실행기에 종속되지 않기 때문에, 다른 언어들의 커널을 지원할 뿐만 아니라, 환경만 갖춰져 있다면 같은 언어의 다양한 버전에 대해서도 별도의 커널을 만들어 사용할 수 있다. 나아가 파이썬의 virtualenv와 결합하면 환경별로도 커널을 분리해 사용할 수 있다. 이와 같이 다중 커널 개념은 Jupyter의 핵심 개념이며, 이를 통해서 좀 더 자유롭게 Notebook 생활이 가능해질 것이다. 참고사이트: http://jupyter-notebook.readthedocs.org/en/latest/public_server.html 실행방법 시작 디렉터리 위치 변경 Window Linux 우분투환경 Securing a notebook server profile 생성없이 defalut내용을 바로 변경한다. 전체 Jupyter에 영향을 미친다. Preparing a hashed password 패스워드를 사용할 때 SSL을 사용하는것은 좋은 생각이다. 서버 설정 내용을 또는 아래의 명령어로 수작업으로 설정해 줄수도 있다. 명렁어 기타설정 현재 설치된 커널 종류 확인 python2 커널 설치 커널 설치 확인 추가 설정 자료 버전어 맞춰서 아래 명령어를 이용한다. terminal window를 유지하지 않아도 connection이 보장된다. 물론 그냥 이렇게 실행한 프로세스는 좀 더 일반적인 확인 후 종료 service 생성 아래의 내용을 입력한다. service 등록 service 상태 알애내기 재시작: sudo systemctl restart jupyter.service 참고문서: https://wiki.ubuntu.com/SystemdForUpstartUsers 1. IP 변경에 따른 에러 2. SSL 사용 오류 config file에서 아래의 SSL 설정관련 코드들이 문제가 된다. 파일위치: 아래는 에러 코드이다.Jupyter 서버 설치 및 실행법
Notebook에 대해서 살펴본다.source ~/tensorflow/bin/activate # virtualEnv 활성화를 통한 TensorFlow library 연동
#활성화 성공
#활성화 한다음 아래의 config 파일이 있는 디렉터리로 이동한다음 jupyter를 실행 해야 한다!!!
(tensorflow)root@jemin-virtual-machine:~/.jupyter#
# jemin_config.py 환경으로 Jupyter 실행
# jemin_config.py는 SSL 설정을 Disable 한것이다.
jupyter notebook --config jemin_config.py
설치 및 실행
Jupyter가 다중 kernel을 지원한다고 한다.
즉, python 2,3 모두를 지원 한다.pip
이고 python3은 pip3
이다.pip install jupyter
jupyter notebook
(tensorflow)root@jemin-virtual-machine:~/.jupyter# jupyter notebook --h
usage: jupyter-notebook [-h] [--certfile NOTEBOOKAPP.CERTFILE]
[--ip NOTEBOOKAPP.IP] [--pylab [NOTEBOOKAPP.PYLAB]]
[--log-level NOTEBOOKAPP.LOG_LEVEL]
[--port-retries NOTEBOOKAPP.PORT_RETRIES]
[--notebook-dir NOTEBOOKAPP.NOTEBOOK_DIR]
[--config NOTEBOOKAPP.CONFIG_FILE]
[--keyfile NOTEBOOKAPP.KEYFILE]
[--port NOTEBOOKAPP.PORT]
[--transport KERNELMANAGER.TRANSPORT]
[--browser NOTEBOOKAPP.BROWSER] [--script] [-y]
[--no-browser] [--debug] [--no-mathjax] [--no-script]
[--generate-config]
optional arguments:
-h, --help show this help message and exit
--certfile NOTEBOOKAPP.CERTFILE
--ip NOTEBOOKAPP.IP
--pylab [NOTEBOOKAPP.PYLAB]
--log-level NOTEBOOKAPP.LOG_LEVEL
--port-retries NOTEBOOKAPP.PORT_RETRIES
--notebook-dir NOTEBOOKAPP.NOTEBOOK_DIR
--config NOTEBOOKAPP.CONFIG_FILE
--keyfile NOTEBOOKAPP.KEYFILE
--port NOTEBOOKAPP.PORT
--transport KERNELMANAGER.TRANSPORT
--browser NOTEBOOKAPP.BROWSER
--script
-y, --y
--no-browser
--debug
--no-mathjax
--no-script
--generate-config
설정 방법
jupyter notebook
아이콘 오른쪽버튼 -> 시작 경로 변경
To launch Jupyter Notebook App:원격 서버로 설정
jupyter notebook --generate-config
Writing default config to: /root/.jupyter/jupyter_notebook_config.py
In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[2]: 'sha1:f24baff49ac5:863dd2ae747212ede58125302d227f0ca7b12bb3'
jupyter_notebook_config.py
를 열어서 아래의 내용을 입력한다.# Password to use for web authentication
c = get_config()
c.NotebookApp.password ='sha1:f24baff49ac5:863dd2ae747212ede58125302d227f0ca7b12bb3'
SSL을 이용해서 브라우저에서 패스워드가 암호화되서 보내지기 때문이다.
이를 위해서 self-signed certificate
를 생성 한다.OpenSSL
을 이용해서 certificate을 생성할 수 있다. 유효기간은 365일이다.openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem
jupyter_notebook_config.py
를 열어서 아래의 내용을 입력한다.c.NotebookApp.certfile ='/absolute/path/to/your/certificate/mycert.pem'
jupyter_notebook_config.py
를 열어서 아래의 내용을 입력한다.# The IP address the notebook server will listen on.
# c.NotebookApp.ip = 'localhost'
c.NotebookApp.ip = '192.168.174.131'
# c.NotebookApp.port_retries = 50
c.NotebookApp.port_retries = 8888
jupyter notebook --ip=* --no-browser
특정 config 파일로 실행 하기
--config jemin_config.py
를 설정해 준다.(tensorflow)root@jemin-virtual-machine:~/.jupyter# jupyter notebook --config jemin_config.py
[I 00:46:15.432 NotebookApp] Serving notebooks from local directory: /root/DataScience/
[I 00:46:15.432 NotebookApp] 0 active kernels
[I 00:46:15.432 NotebookApp] The IPython Notebook is running at: http://192.168.174.132:8888/
[I 00:46:15.432 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
#실행과 동시에 web-browser를 실행하지 않게 한다.
c.NotebookApp.open_browser = False
#시작 디렉터리를 변경한다.
c.NotebookApp.notebook_dir = u'/root/DataScience/'
c.NotebookApp.matplotlib='inline'
옵션은 사용하지 못하도록 변경되었다.
IPython shell에서 직접 magic 함수를 이용해야 한다.%matplotlib inline
다중 Kernel 사용 하기
jupyter kernelspec list
(tensorflow_py2) jemin@jemin-desktop:~$ jupyter kernelspec list
Available kernels:
python3 /home/jemin/.local/lib/python3.5/site-packages/ipykernel/resources
python2 -m pip install ipykernel
python2 -m ipykernel install --user
(tensorflow_py2) jemin@jemin-desktop:~$ jupyter kernelspec list
Available kernels:
python3 /home/jemin/.local/lib/python3.5/site-packages/ipykernel/resources
python2 /home/jemin/.local/share/jupyter/kernels/python2
https://songyunseop.github.io/post/2016/09/Using-Jupyter-inside-virtualenv/업데이트 방법
python 3.5는 pip3
python 2.7는 pippip install --upgrade pip # pip update
pip install jupyter
백그라운드에서 실행하기
nohup
명령어의 기능nohup.out
또는 다른곳으로 redirection하는 작업 수행&
만 뒤에 붙여주면 shell
에서 백그라운드로 동작하지만 terminal
을 닫으면 프로세스가 terminate되기 때문에 보장되지 않는다.nohup jupyter notebook &
kill
로 terminate해야 한다.lsof nohup.out
kill -9 <PID>
1. “ps -ef | grep 쉘스크립트파일명” 명령으로 데몬형식으로 실행
2. "kill -9 PID번호“ 명령으로 해당 프로세스 종료
부팅시 자동 실행 (19.5.8 수정)
sudo vim /etc/systemd/system/jupyter.service
[Unit]
Description=Jupyter Notebook Server
[Service]
Type=simple
PIDFile=/run/jupyter.pid
User=<username>
ExecStart=/home/<username>/.local/bin/jupyter-notebook
WorkingDirectory=/your/working/dir
[Install]
WantedBy=multi-user.target
ExecStart
설정은 anaconda의 경우 /home/<username>/anaconda3/bin/jupyter-notebook
으로 설정한다. 각자 상황에 맞춰서 설정해야 한다.systemctl daemon-reload
systemctl enable jupyter.service
systemctl start jupyter.service
sudo systemctl status jupyter.service
● jupyter.service - Jupyter Notebook
Loaded: loaded (/etc/systemd/system/jupyter.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-05-08 15:07:55 KST; 17min ago
Main PID: 2057 (jupyter-noteboo)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/jupyter.service
└─2057 /home/jemin/anaconda3/bin/python /home/jemin/anaconda3/bin/jupyter-notebook
5월 08 15:07:56 jemin jupyter-notebook[2057]: [I 15:07:56.357 NotebookApp] JupyterLab extension loaded from /home/jemin/anaconda3/lib/python3.7/s
5월 08 15:07:56 jemin jupyter-notebook[2057]: [I 15:07:56.357 NotebookApp] JupyterLab application directory is /home/jemin/anaconda3/share/jupyte
5월 08 15:07:56 jemin jupyter-notebook[2057]: [I 15:07:56.358 NotebookApp] Serving notebooks from local directory: /home/jemin/development
5월 08 15:07:56 jemin jupyter-notebook[2057]: [I 15:07:56.358 NotebookApp] The Jupyter Notebook is running at:
5월 08 15:07:56 jemin jupyter-notebook[2057]: [I 15:07:56.358 NotebookApp] http://192.168.0.4:8888/
5월 08 15:07:56 jemin jupyter-notebook[2057]: [I 15:07:56.358 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to
5월 08 15:07:56 jemin jupyter-notebook[2057]: [W 15:07:56.360 NotebookApp] No web browser found: could not locate runnable browser.
5월 08 15:20:16 jemin jupyter-notebook[2057]: [I 15:20:16.468 NotebookApp] 302 GET / (192.168.0.2) 1.18ms
5월 08 15:20:16 jemin jupyter-notebook[2057]: [I 15:20:16.470 NotebookApp] 302 GET /tree? (192.168.0.2) 0.28ms
5월 08 15:20:18 jemin jupyter-notebook[2057]: [I 15:20:18.201 NotebookApp] 302 POST /login?next=%2Ftree%3F (192.168.0.2) 2.41ms
멈춤: sudo systemctl stop jupyter.service
해제: sudo systemctl disable jupyter.serviceTrouble Shooting
(tensorflow)root@jemin-virtual-machine:~/.jupyter# jupyter notebook --profile=jemin_config.py
[W 20:34:44.745 NotebookApp] Unrecognized alias: '--profile=jemin_config.py', it will probably have no effect.
Traceback (most recent call last):
File "/usr/local/bin/jupyter-notebook", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/jupyter_core/application.py", line 267, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line 591, in launch_instance
app.initialize(argv)
File "<string>", line 2, in initialize
File "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/notebook/notebookapp.py", line 1007, in initialize
self.init_webapp()
File "/usr/local/lib/python2.7/dist-packages/notebook/notebookapp.py", line 873, in init_webapp
self.http_server.listen(port, self.ip)
File "/usr/local/lib/python2.7/dist-packages/tornado/tcpserver.py", line 126, in listen
sockets = bind_sockets(port, address=address)
File "/usr/local/lib/python2.7/dist-packages/tornado/netutil.py", line 196, in bind_sockets
sock.bind(sockaddr)
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 99] Cannot assign requested address
보안상 문제가 있지만 그냥 주석처리하고 실행 한다./root/.jupyter
c.notebookApp.certfile = u'/root/.jupyter/mycert.crt'
c.notebookApp.certfile = u'/root/.jupyter/mycert.key'
(tensorflow)root@jemin-virtual-machine:~/.jupyter# jupyter notebook --profile="jemin_config.py"
[W 22:43:24.515 NotebookApp] Unrecognized alias: '--profile=jemin_config.py', it will probably have no effect.
[W 22:43:24.520 NotebookApp] Error loading config file: jupyter_notebook_config
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/jupyter_core/application.py", line 202, in load_config_file
path=path
File "<string>", line 2, in load_config_file
File "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line 564, in load_config_file
collisions = loaded[0].collisions(loaded[1])
File "/usr/local/lib/python2.7/dist-packages/traitlets/config/loader.py", line 212, in collisions
for key in mine:
TypeError: 'LazyConfigValue' object is not iterable
[I 22:43:24.545 NotebookApp] Serving notebooks from local directory: /root/DataScience/
[I 22:43:24.545 NotebookApp] 0 active kernels
[I 22:43:24.545 NotebookApp] The IPython Notebook is running at: http://192.168.174.132:8888/
[I 22:43:24.545 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
참고사이트
'Computer Science > Python' 카테고리의 다른 글
Ctypes를 이용한 Python과 C와의 연결 (0) | 2019.07.05 |
---|---|
PyCharm에서 PYTHONPATH 설정하기 (0) | 2019.04.22 |
Jupyter 서버 설치 및 실행법 (8) | 2018.04.25 |
Python 파라메터 앞에 *와 **의 의미 (*args, **kwargs) (0) | 2017.02.02 |
Python 2 와 Python 3의 차이점 (0) | 2017.01.31 |
PyCharm을 우분투 14.04설치 하는 방법 (1) | 2016.04.13 |
-
박상우 2017.03.15 11:20
좋은글 잘 봤습니다 감사합니다^^
이 부분과 관려해서 궁금한게 있어서 글 남깁니다.
저는 맥을 사용하고 작성자 분께서 알려주신대로 진행하였는데,
저의 경우 Pychram을 통해서 주피터 노트북을 연결할때 'Authenticaton token' 을 입력해 달라고 나옵니다.
pycharm에 연결되어있는 http://127.0.0.1:8888 로 들어가 보면 비밀번호를 요구하고요.
c.NotebookApp.password =
u'sha1:f24baff49ac5:863dd2ae747212ede58125302d227f0ca7b12bb3' 이런 방식으로 진행하여도 계속해서 위와같은
문제가 발생합니다 . 어떻게 하면될까요??
-
Pycharm으로 하실경우 설정을 다르게 해야할것 같습니다. 제가 설명 드린 방법은 jupyter notebook configuration을 건드리는 방법이라서 pycharm으로 실행 할 때는 계속해서 token을 입력하고 메시지가 나올 수 있습니다.
저는 그래서 그냥 py 파일로 구조적으로 개발할 때 pycharm을 쓰고 notebook 스타일로 할 때는 jupyter를 사용합니다. 간단한 것들을 확인 할 때는 주피터를 쓰고 이제 그것을 좀 체계적으로 모듈이나 클래스화해서 작성 할때는 pycharm을 쓰는 상황입니다.
-
-
newbornking87@gmail.com 2017.04.24 11:04
안녕하세요 주피터 서버를 설치 따라해봤는데요.
원래 localhost에서는 kernel 이 있었는데
아이피는 바꾸니 ' 0 active kernel' 이라고 나오는데 혹시 어떤 문제인지 아시나요 -
김종석 2017.12.07 16:27
안녕하세요 글 잘 읽었습니다
파이션 /텐서플로우/주피터노트북 설치를 하였습니다.
이상한 현상이 있어 문의 합니다.
설치 후 주피터노트북 잘 됩니다.
하지만 PC를 재부팅하면 주피터노트북이 안됩니다.
그럼 다시 파이션/텐서플로우/주피터노트북 삭제 후 재설치 하면 됩니다.
그리고 재부팅하면 주피터노트북만 또 안됩니다.
10회 이상 했는데 반복적입니다.
에러 코드는 아래와 같습니다.
제가 뭘 잘못 했을까요
---아 래---
---jupyter notebook 실행시 로그---
[I 07:53:41.222 NotebookApp] Serving notebooks from local directory: C:\Users\HANWHA\Desktop\tensorflow
[I 07:53:41.222 NotebookApp] 0 active kernels
[I 07:53:41.222 NotebookApp] The Jupyter Notebook is running at:
[I 07:53:41.222 NotebookApp] http://localhost:8888/?token=df626579c635698aa726ce478bdd17a1e1ac56a160bb6341
[I 07:53:41.222 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 07:53:41.222 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=df626579c635698aa726ce478bdd17a1e1ac56a160bb6341
[I 07:53:41.550 NotebookApp] Accepting one-time-token-authenticated connection from ::1
[E 07:53:41.589 NotebookApp] Uncaught exception GET /tree?token=40aece71f09ac75d7365267fc50d47e27aa12621ec199ae4 (::1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/tree?token=40aece71f09ac75d7365267fc50d47e27aa12621ec199ae4', version='HTTP/1.1', remote_ip='::1', headers={'Cookie': '_xsrf=2|4d15587d|cdb38707640ad8ec866d5d7095ca9a47|1511477459; username-localhost-8889="2|1:0|10:1511503997|23:username-localhost-8889|44:YzIwM2VhODY2NzhhNDQwZDg1MzJlOWY1OGUxZjNlZDI=|0c15ca836d89e9954b08b88c98e3a87a839b495cbb59702603fd87eeea1a1105"; username-localhost-8888="2|1:0|10:1511507749|23:username-localhost-8888|44:NDcxN2Y2YmQxOGE2NDdmOWEwZDVkNGE3ZjI5M2Y5MWE=|04879e5d15f5e7714dcf8d825aba5c6a78d8a43f1c9b7d61ec53ee1bd21a0e47"', 'Host': 'localhost:8888', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8', 'Accept-Encoding': 'gzip, deflate, br', 'Connection': 'keep-alive', 'Accept-Language': 'ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7', 'Upgrade-Insecure-Requests': '1', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36'})
Traceback (most recent call last):
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\tornado\web.py", line 1509, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\tornado\web.py", line 2897, in wrapper
return method(self, *args, **kwargs)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\notebook\tree\handlers.py", line 53, in get
server_root=self.settings['server_root_dir'],
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\notebook\base\handlers.py", line 376, in render_template
template = self.get_template(name)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\notebook\base\handlers.py", line 372, in get_template
return self.settings['jinja2_env'].get_template(name)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\jinja2\environment.py", line 830, in get_template
return self._load_template(name, self.make_globals(globals))
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\jinja2\environment.py", line 804, in _load_template
template = self.loader.load(self, name, globals)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\jinja2\loaders.py", line 113, in load
source, filename, uptodate = self.get_source(environment, name)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\jinja2\loaders.py", line 187, in get_source
raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: tree.html
[E 07:53:41.615 NotebookApp] Uncaught exception in write_error
Traceback (most recent call last):
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\tornado\web.py", line 1509, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\tornado\web.py", line 2897, in wrapper
return method(self, *args, **kwargs)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\notebook\tree\handlers.py", line 53, in get
server_root=self.settings['server_root_dir'],
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\notebook\base\handlers.py", line 376, in render_template
template = self.get_template(name)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\notebook\base\handlers.py", line 372, in get_template
return self.settings['jinja2_env'].get_template(name)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\jinja2\environment.py", line 830, in get_template
return self._load_template(name, self.make_globals(globals))
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\jinja2\environment.py", line 804, in _load_template
template = self.loader.load(self, name, globals)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\jinja2\loaders.py", line 113, in load
source, filename, uptodate = self.get_source(environment, name)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\jinja2\loaders.py", line 187, in get_source
raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: tree.html
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\notebook\base\handlers.py", line 443, in write_error
html = self.render_template('%s.html' % status_code, **ns)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\notebook\base\handlers.py", line 376, in render_template
template = self.get_template(name)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\notebook\base\handlers.py", line 372, in get_template
return self.settings['jinja2_env'].get_template(name)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\jinja2\environment.py", line 830, in get_template
return self._load_template(name, self.make_globals(globals))
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\jinja2\environment.py", line 804, in _load_template
template = self.loader.load(self, name, globals)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\jinja2\loaders.py", line 113, in load
source, filename, uptodate = self.get_source(environment, name)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\jinja2\loaders.py", line 187, in get_source
raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: 500.html
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\tornado\web.py", line 1036, in send_error
self.write_error(status_code, **kwargs)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\notebook\base\handlers.py", line 445, in write_error
html = self.render_template('error.html', **ns)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\notebook\base\handlers.py", line 376, in render_template
template = self.get_template(name)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\notebook\base\handlers.py", line 372, in get_template
return self.settings['jinja2_env'].get_template(name)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\jinja2\environment.py", line 830, in get_template
return self._load_template(name, self.make_globals(globals))
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\jinja2\environment.py", line 804, in _load_template
template = self.loader.load(self, name, globals)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\jinja2\loaders.py", line 113, in load
source, filename, uptodate = self.get_source(environment, name)
File "c:\users\hanwha\appdata\local\programs\python\python35\lib\site-packages\jinja2\loaders.py", line 187, in get_source
raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: error.html
[E 07:53:41.625 NotebookApp] {
"Cookie": "_xsrf=2|4d15587d|cdb38707640ad8ec866d5d7095ca9a47|1511477459; username-localhost-8889=\"2|1:0|10:1511503997|23:username-localhost-8889|44:YzIwM2VhODY2NzhhNDQwZDg1MzJlOWY1OGUxZjNlZDI=|0c15ca836d89e9954b08b88c98e3a87a839b495cbb59702603fd87eeea1a1105\"; username-localhost-8888=\"2|1:0|10:1511507749|23:username-localhost-8888|44:NDcxN2Y2YmQxOGE2NDdmOWEwZDVkNGE3ZjI5M2Y5MWE=|04879e5d15f5e7714dcf8d825aba5c6a78d8a43f1c9b7d61ec53ee1bd21a0e47\"",
"Host": "localhost:8888",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"Accept-Encoding": "gzip, deflate, br",
"Connection": "keep-alive",
"Accept-Language": "ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7",
"Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36"
}
[E 07:53:41.625 NotebookApp] 500 GET /tree?token=40aece71f09ac75d7365267fc50d47e27aa12621ec199ae4 (::1) 75.22ms referer=None
-
박주형 2018.02.25 15:57
안녕하세요?
컴퓨터를 포멧하면서 다시 세팅을 하는중인데요.
1. IP 변경에 따른 에러 OSError: [Errno 99] Cannot assign requested address
가 뜨네요..
Rstudio server 는 외부에서 :8787 치고 잘 들어가지는데요
jupyter server 는 locall ip 로만 실행되네요..
config 에서 수정하거나 jupyter-notebook --ip=118.... 이렇게 치면 에러가 납니다.
어떻게 해결하셨는지 궁금합니다.