ipython 서버를 시작할 수 없음 : notebook.notebookapp라는 모듈이 없습니다.
나는 몇 가지 튜토리얼을 따라 ipython 서버를 설정하려고 시도했습니다 (정확히 내 경우가 아니기 때문에). 며칠 전, 나는 그것이 시작되는 지점까지 그것을 관리했지만 URL을 통해 액세스 할 수 없었습니다. 오늘은 더 이상 시작되지 않으며이 특정 오류에 대해 많이 찾을 수 없습니다.
Traceback (most recent call last):
File "/usr/local/bin/ipython", line 9, in <module>
load_entry_point('ipython==4.0.0-dev', 'console_scripts', 'ipython')()
File "/usr/local/lib/python2.7/dist-packages/ipython-4.0.0_dev-py2.7.egg/IPython/__init__.py", line 118, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/traitlets-4.0.0-py2.7.egg/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-4.0.0-py2.7.egg/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/ipython-4.0.0_dev-py2.7.egg/IPython/terminal/ipapp.py", line 302, in initialize
super(TerminalIPythonApp, self).initialize(argv)
File "<string>", line 2, in initialize
File "/usr/local/lib/python2.7/dist-packages/traitlets-4.0.0-py2.7.egg/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/ipython-4.0.0_dev-py2.7.egg/IPython/core/application.py", line 386, in initialize
self.parse_command_line(argv)
File "/usr/local/lib/python2.7/dist-packages/ipython-4.0.0_dev-py2.7.egg/IPython/terminal/ipapp.py", line 297, in parse_command_line
return super(TerminalIPythonApp, self).parse_command_line(argv)
File "<string>", line 2, in parse_command_line
File "/usr/local/lib/python2.7/dist-packages/traitlets-4.0.0-py2.7.egg/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/traitlets-4.0.0-py2.7.egg/traitlets/config/application.py", line 487, in parse_command_line
return self.initialize_subcommand(subc, subargv)
File "<string>", line 2, in initialize_subcommand
File "/usr/local/lib/python2.7/dist-packages/traitlets-4.0.0-py2.7.egg/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/traitlets-4.0.0-py2.7.egg/traitlets/config/application.py", line 418, in initialize_subcommand
subapp = import_item(subapp)
File "build/bdist.linux-x86_64/egg/ipython_genutils/importstring.py", line 31, in import_item
ImportError: No module named notebook.notebookapp
그래서 설정에 대해 ipython, pyzmq 및 tornado 라이브러리의 anaconda distrib을 설치했습니다. 프로필 nbserver를 만들었고 구성 파일은 다음과 같습니다-ipython.config.py :
c = get_config()
c.IPKernalApp.pylab = 'inline'
c.NotebookApp.certfile = u'/home/ludo/.ipython/profile_nbserver/mycert.pem'
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.password = u'sha1:e6cb2aa9a[...]'
c.NotebookApp.port = 9999
c.NotebookManager.notebook_dir = u'/var/www/ipynb/'
c.NotebookApp.base_project_url = '/ipynb/'
c.NotebookApp.base_kernel_url = '/ipynb/'
c.NotebookApp.webapp_settings = {'static_url_prefix':'/ipynb/static/'}
I really don't know where to look for clues anymore - and I'm probably lacking a greater understanding of how all this works to figure it out. My ultimate goal is to then use the answer to this question on SO to complete a setup behind apache and eventually connect it to colaboratory - but seems like it should launch first.
Many thanks for any help :)
This should fix the issue:
pip install jupyter
I received the same problem when upgrading IPython. At the moment the answer was written, it was a bug linked to the latest 4
version. If a similar problem occurs for which you wish to switch back to the stable version 3.2.1
:
pip uninstall -y IPython
pip install ipython==3.2.1
- note: the
-y
option indicates "yes I want to uninstall" with no interaction. - note 2: possible duplicate in ImportError: No module named notebook.notebookapp
So to close this thread, and in case it helps anyone, my mistake was to have installed and used the dev version of ipython blindly following a tutorial, thinking I was using the anaconda instance I installed earlier (which was not even in my PATH).
Anyhow I:
- uninstalled that ipython dev instance
- added anaconda/bin to my zsh path (add it to ~/.zshrc - that's why it was not even in my path after install) // at this point the server was launching fine but I couldn't access it in my browser >> firewall problems.
- opened my port of choice in my firewall (help for linode or ubuntu in general)
And everything works fine now.
Someone mentioned this in a comment, and it (almost) worked for me:
pip install ipython[notebook]
pip
gave an error about the hash not matching. However, what ultimately worked was:
sudo port install py27-notebook
And for py3:
sudo port install py35-notebook
You should not try to install from github master branch if you do not now what you are doing. Remove what you have installed and stick to stable version.
If you want to work on developpement version, ask on the developpement mailing-list. Some knowlege on how to debug this will probably be required.
'programing tip' 카테고리의 다른 글
Django CSRF 쿠키가 설정되지 않음 (0) | 2020.11.13 |
---|---|
'찾기'명령으로 수정 된 날짜 시간을 표시하는 방법은 무엇입니까? (0) | 2020.11.13 |
사이트가 HTTPS이지만 ERR_CLEARTEXT_NOT_PERMITTED를 표시하는 WebView (0) | 2020.11.13 |
자신의 Android 블루투스 트래픽 스니핑 / 로깅 (0) | 2020.11.12 |
ON CONFLICT 절에서 여러 충돌 대상 사용 (0) | 2020.11.12 |