问题
I have installed py27 and ipython and notebook by macport on my mac osx10.9.4.
I can open ipython and it works fine but I cannot open ipython notebook.
After I type in
ipython notebook
I got this.
2014-07-23 12:22:11.626 [NotebookApp] Using existing profile dir: u'/Users/zhiyiwu/.ipython/profile_default' 2014-07-23 12:22:11.630 [NotebookApp] Using MathJax from CDN: http://cdn.mathjax.org/mathjax/latest/MathJax.js Traceback (most recent call last): File "/opt/local/bin/ipython", line 5, in start_ipython() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/init.py", line 120, in start_ipython return launch_new_instance(argv=argv, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/config/application.py", line 563, in launch_instance app.initialize(argv) File "", line 2, in initialize File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/config/application.py", line 92, in catch_config_error return method(app, *args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 321, in initialize super(TerminalIPythonApp, self).initialize(argv) File "", line 2, in initialize File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/config/application.py", line 92, in catch_config_error return method(app, *args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/core/application.py", line 381, in initialize self.parse_command_line(argv) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 316, in parse_command_line return super(TerminalIPythonApp, self).parse_command_line(argv) File "", line 2, in parse_command_line File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/config/application.py", line 92, in catch_config_error return method(app, *args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/config/application.py", line 475, in parse_command_line return self.initialize_subcommand(subc, subargv) File "", line 2, in initialize_subcommand File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/config/application.py", line 92, in catch_config_error return method(app, *args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/config/application.py", line 413, in initialize_subcommand self.subapp.initialize(argv) File "", line 2, in initialize File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/config/application.py", line 92, in catch_config_error return method(app, *args, **kwargs) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/html/notebookapp.py", line 745, in initialize self.init_webapp() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/html/notebookapp.py", line 632, in init_webapp self.http_server.listen(port, self.ip) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tornado/tcpserver.py", line 125, in listen sockets = bind_sockets(port, address=address) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tornado/netutil.py", line 98, in bind_sockets 0, flags)): gaierror: [Errno 8] nodename nor servname provided, or not known
If you suspect this is an IPython bug, please report it at: https://github.com/ipython/ipython/issues or send an email to the mailing list at ipython-dev@scipy.org
You can print a more detailed traceback right now with "%tb", or use "%debug" to interactively debug it.
Extra-detailed tracebacks for bug-reporting purposes can be enabled via: c.Application.verbose_crash=True
Is there anyway to get my notebook started?
回答1:
This appears to be related to ipython ip socket issues. A verified workaround:
ipython notebook --ip=127.0.0.1
is presented at https://github.com/ipython/ipython/issues/6191#issuecomment-49903748.
回答2:
I take another distribution of python, it's Anaconda. You can find here : https://store.continuum.io/cshop/anaconda/ It contains an IDE with Ipython terminal, it's very usefull and you can have easily access to the notebook to.
来源:https://stackoverflow.com/questions/24910583/cannot-start-ipython-notebook