【问题标题】:Anaconda jupyter notebook will not start on MacAnaconda jupyter notebook 无法在 Mac 上启动
【发布时间】:2018-02-20 22:08:47
【问题描述】:

我突然在我的 Mac OS X Sierra 10.12.6 上启动 jupyter notebook 时遇到问题。我卸载并重新安装了 Anaconda 4.2.0,查看 anaconda.com。这是发生了什么:

$ jupyter notebook
[I 17:00:20.982 NotebookApp] [nb_conda_kernels] enabled, 3 kernels found
Traceback (most recent call last):
  File "/Users/myUserName/anaconda/bin/jupyter-notebook", line 6, in <module>
    sys.exit(notebook.notebookapp.main())
  File "/Users/myUserName/anaconda/lib/python2.7/site-packages/jupyter_core/application.py", line 267, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/Users/myUserName/anaconda/lib/python2.7/site-packages/traitlets/config/application.py", line 652, in launch_instance
    app.initialize(argv)
  File "<decorator-gen-7>", line 2, in initialize
  File "/Users/myUserName/anaconda/lib/python2.7/site-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/Users/myUserName/anaconda/lib/python2.7/site-packages/notebook/notebookapp.py", line 1071, in initialize
    self.init_webapp()
  File "/Users/myUserName/anaconda/lib/python2.7/site-packages/notebook/notebookapp.py", line 919, in init_webapp
    self.http_server.listen(port, self.ip)
  File "/Users/myUserName/anaconda/lib/python2.7/site-packages/tornado/tcpserver.py", line 126, in listen
    sockets = bind_sockets(port, address=address)
  File "/Users/myUserName/anaconda/lib/python2.7/site-packages/tornado/netutil.py", line 194, in bind_sockets
    sock.bind(sockaddr)
  File "/Users/myUserName/anaconda/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 49] Can't assign requested address

我找不到帮助。

【问题讨论】:

  • 确保端口上没有运行任何东西。你可以通过sudo lsof -i -n -P | grep TCP查看它
  • 我一直在尝试通过 USB 使用无头 Raspberry Pi。无论这意味着什么,RPi“就像以太网一样”。我有很多僵尸 TCP 连接。

标签: python anaconda jupyter-notebook jupyter


【解决方案1】:

打开您的端口似乎有问题,可能是另一个应用程序正在使用该端口,或者有什么东西阻止了 jupyter。也许您可以使用如下命令尝试其他端口:

jupyter notebook --ip=0.0.0.0 --port=8081

【讨论】:

  • 好的。这行得通!我不明白 jupyter 如何选择端口。它必须是软件端口。谢谢!
  • 很高兴,您可以使用 '''$ lsof -i :8080 | 检查哪些程序正在使用您的端口grep 听'''。可以将问题标记为已回答吗?。
  • 这行得通,但我永远也想不通。我在 Google 上搜索了 jupyter notebook not started 的各种变体。
猜你喜欢
  • 2023-04-03
  • 1970-01-01
  • 1970-01-01
  • 2021-02-13
  • 2023-01-28
  • 2023-02-20
  • 1970-01-01
  • 2019-02-17
  • 1970-01-01
相关资源
最近更新 更多