vscode-jupyter: Vscode Jupyter Notebook Error: Fail to start the Python Kernel. Jupyter server crashed. Unable to connect Error code from Jupyter: 1
Environment data
Migrated from Macbook Pro mid-2015 to Macbook Pro M2
- VS Code version: 1.75.0
- Jupyter Extension version (available under the Extensions sidebar): 2023.1.2000312134.
- Python Extension version (available under the Extensions sidebar): 2023.2.0.
- OS (Windows | Mac | Linux distro) and version: MacOS Ventura 13.2
- Python and/or Anaconda version: 3.6.4/1.8.0
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): Conda
- Jupyter server running: Local | Remote | Local
Expected behaviour
Tried to select different python interpreter and set the flags in user settings per recommendations. I even uninstalled vscode and reinstalled the version for Apple silicon.
Actual behaviour
It ran fine in my older macbook pro mid-2015 intel based, but it’s running into issues with the following errors. I pasted the entire output log in the “Log” section of this issue report.
Failed to start the Kernel.
Jupyter server crashed. Unable to connect.
Error code from Jupyter: 1
[W 2023-02-02 18:26:30.449 LabApp] ‘notebook_dir’ has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-02-02 18:26:30.449 LabApp] ‘config_file’ was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[W 2023-02-02 18:26:30.449 LabApp] ‘config_file’ was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[W 2023-02-02 18:26:30.449 LabApp] ‘iopub_data_rate_limit’ has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
- Open a jupyter notebook and run the first cell, and you will get the error, and the log is pasted at the bottom.
Logs
Output for Jupyter
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Jupyter
)
Visual Studio Code (1.75.0, undefined, desktop)
Jupyter Extension Version: 2023.1.2000312134.
Python Extension Version: 2023.2.0.
No workspace folder opened.
warn 18:28:25.526: Exception while attempting zmq : No native build was found for platform=darwin arch=arm64 runtime=electron abi=106 uv=1 armv=8 libc=glibc node=16.14.2 electron=19.1.9
loaded from: /Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/node_modules/zeromq
User belongs to experiment group 'jupyterTest'
User belongs to experiment group 'jupyterEnhancedDataViewer'
info 18:28:25.586: LSP Notebooks experiment is disabled -- Pylance disabled or not installed
info 18:28:26.218: Find preferred kernel for /Users/brandonl/projects/Hoeffding Tree/incremental_training.ipynb with metadata {"kernelspec":{"display_name":"py39","language":"python","name":"python3"},"language_info":{"name":"python","version":"3.9.9"},"orig_nbformat":4,"vscode":{"interpreter":{"hash":"c098615e34024d68ded567e6f5a3455f01c2e2979cc9dc5678c0b113e3bee0d7"}}} & preferred interpreter /Users/brandonl/opt/anaconda3/bin/python3
info 18:28:26.219: Find preferred kernel for /Users/brandonl/projects/Hoeffding Tree/incremental_training.ipynb with metadata {"kernelspec":{"display_name":"py39","language":"python","name":"python3"},"language_info":{"name":"python","version":"3.9.9"},"orig_nbformat":4,"vscode":{"interpreter":{"hash":"c098615e34024d68ded567e6f5a3455f01c2e2979cc9dc5678c0b113e3bee0d7"}}} & preferred interpreter /Users/brandonl/opt/anaconda3/bin/python3
info 18:28:26.236: Starting Jupyter Session startUsingPythonInterpreter, .jvsc74a57bd0c098615e34024d68ded567e6f5a3455f01c2e2979cc9dc5678c0b113e3bee0d7./Users/brandonl/opt/anaconda3/envs/py39/python./Users/brandonl/opt/anaconda3/envs/py39/python.-m#ipykernel_launcher (Python Path: /Users/brandonl/opt/anaconda3/envs/py39, EnvType: Conda, EnvName: 'py39', Version: 3.9.9 | packaged by conda-forge | (main, Dec 20 2021, 02:41:37)
[Clang 11.1.0 ]) for '/Users/brandonl/projects/Hoeffding Tree/incremental_training.ipynb' (disableUI=true)
info 18:28:26.236: Checking for server existence.
info 18:28:26.251: Find preferred kernel for /Users/brandonl/projects/Hoeffding Tree/incremental_training.ipynb with metadata {"kernelspec":{"display_name":"py39","language":"python","name":"python3"},"language_info":{"name":"python","version":"3.9.9"},"orig_nbformat":4,"vscode":{"interpreter":{"hash":"c098615e34024d68ded567e6f5a3455f01c2e2979cc9dc5678c0b113e3bee0d7"}}} & preferred interpreter /Users/brandonl/opt/anaconda3/bin/python3
info 18:28:26.253: Preferred kernel .jvsc74a57bd0c098615e34024d68ded567e6f5a3455f01c2e2979cc9dc5678c0b113e3bee0d7./Users/brandonl/opt/anaconda3/envs/py39/python./Users/brandonl/opt/anaconda3/envs/py39/python.-m#ipykernel_launcher is exact match or top match for non python kernels, (false, undefined, true, false)
info 18:28:26.253: PreferredConnection: .jvsc74a57bd0c098615e34024d68ded567e6f5a3455f01c2e2979cc9dc5678c0b113e3bee0d7./Users/brandonl/opt/anaconda3/envs/py39/python./Users/brandonl/opt/anaconda3/envs/py39/python.-m#ipykernel_launcher found for NotebookDocument: /Users/brandonl/projects/Hoeffding Tree/incremental_training.ipynb
info 18:28:26.803: Process Execution: > ~/opt/anaconda3/bin/python -c "import jupyter;print('6af208d0-cb9c-427f-b937-ff563e17efdf')"
> ~/opt/anaconda3/bin/python -c "import jupyter;print('6af208d0-cb9c-427f-b937-ff563e17efdf')"
info 18:28:26.807: Process Execution: > ~/opt/anaconda3/bin/python -c "import notebook;print('6af208d0-cb9c-427f-b937-ff563e17efdf')"
> ~/opt/anaconda3/bin/python -c "import notebook;print('6af208d0-cb9c-427f-b937-ff563e17efdf')"
info 18:28:26.900: Process Execution: > ~/opt/anaconda3/bin/python3 -m pip list
> ~/opt/anaconda3/bin/python3 -m pip list
info 18:28:26.902: Process Execution: > ~/opt/anaconda3/envs/py39/bin/python -m pip list
> ~/opt/anaconda3/envs/py39/bin/python -m pip list
info 18:28:26.940: Process Execution: > ~/opt/anaconda3/bin/python -m jupyter kernelspec --version
> ~/opt/anaconda3/bin/python -m jupyter kernelspec --version
info 18:28:27.164: Connecting to server
info 18:28:27.164: Launching server
info 18:28:27.165: Starting Notebook
info 18:28:27.166: Generating custom default config at /var/folders/22/f_6vk3095hd0wjpffqpdkrdc0000gn/T/aec71b9e-ab4b-4fb4-b1d2-2953b3ee21d4/jupyter_notebook_config.py
Starting Jupyter from ~/opt/anaconda3/bin/python with arguments --no-browser --notebook-dir="/Users/brandonl/projects/Hoeffding Tree" --config=/var/folders/22/f_6vk3095hd0wjpffqpdkrdc0000gn/T/aec71b9e-ab4b-4fb4-b1d2-2953b3ee21d4/jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0
info 18:28:27.170: Process Execution: > ~/opt/anaconda3/bin/python -m jupyter notebook --no-browser --notebook-dir="/Users/brandonl/projects/Hoeffding Tree" --config=/var/folders/22/f_6vk3095hd0wjpffqpdkrdc0000gn/T/aec71b9e-ab4b-4fb4-b1d2-2953b3ee21d4/jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0
> ~/opt/anaconda3/bin/python -m jupyter notebook --no-browser --notebook-dir="/Users/brandonl/projects/Hoeffding Tree" --config=/var/folders/22/f_6vk3095hd0wjpffqpdkrdc0000gn/T/aec71b9e-ab4b-4fb4-b1d2-2953b3ee21d4/jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0
[W 2023-02-02 18:28:27.994 LabApp] 'notebook_dir' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-02-02 18:28:27.994 LabApp] 'config_file' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[W 2023-02-02 18:28:27.994 LabApp] 'config_file' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[W 2023-02-02 18:28:27.994 LabApp] 'iopub_data_rate_limit' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-02-02 18:28:27.994 LabApp] 'iopub_data_rate_limit' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2023-02-02 18:28:27.997 LabApp] JupyterLab extension loaded from /Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/jupyterlab
[I 2023-02-02 18:28:27.997 LabApp] JupyterLab application directory is /Users/brandonl/opt/anaconda3/share/jupyter/lab
Traceback (most recent call last):
File "/Users/brandonl/opt/anaconda3/bin/jupyter-notebook", line 8, in <module>
sys.exit(main())
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 264, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 664, in launch_instance
app.start()
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 2321, in start
success = self._bind_http_server()
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1796, in _bind_http_server
return self._bind_http_server_unix() if self.sock else self._bind_http_server_tcp()
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1822, in _bind_http_server_tcp
self.http_server.listen(port, self.ip)
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/tornado/tcpserver.py", line 151, in listen
sockets = bind_sockets(port, address=address)
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/tornado/netutil.py", line 161, in bind_sockets
sock.bind(sockaddr)
OSError: [Errno 49] Can't assign requested address
warn 18:28:28.078: Error occurred while trying to start the kernel, options.disableUI=true [Er [Error]: Jupyter server crashed. Unable to connect.
Error code from Jupyter: 1
[W 2023-02-02 18:28:27.994 LabApp] 'notebook_dir' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-02-02 18:28:27.994 LabApp] 'config_file' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[W 2023-02-02 18:28:27.994 LabApp] 'config_file' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[W 2023-02-02 18:28:27.994 LabApp] 'iopub_data_rate_limit' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-02-02 18:28:27.994 LabApp] 'iopub_data_rate_limit' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2023-02-02 18:28:27.997 LabApp] JupyterLab extension loaded from /Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/jupyterlab
[I 2023-02-02 18:28:27.997 LabApp] JupyterLab application directory is /Users/brandonl/opt/anaconda3/share/jupyter/lab
Traceback (most recent call last):
File "/Users/brandonl/opt/anaconda3/bin/jupyter-notebook", line 8, in <module>
sys.exit(main())
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 264, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 664, in launch_instance
app.start()
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 2321, in start
success = self._bind_http_server()
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1796, in _bind_http_server
return self._bind_http_server_unix() if self.sock else self._bind_http_server_tcp()
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1822, in _bind_http_server_tcp
self.http_server.listen(port, self.ip)
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/tornado/tcpserver.py", line 151, in listen
sockets = bind_sockets(port, address=address)
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/tornado/netutil.py", line 161, in bind_sockets
sock.bind(sockaddr)
OSError: [Errno 49] Can't assign requested address
at Sm.rejectStartPromise (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:17:254981)
at t._complete (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:17:255541)
at t.n (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:700797)
at t.__tryOrUnsub (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:701037)
at t.complete (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:700930)
at t._complete (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:699446)
at t.complete (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:699145)
at ChildProcess.<anonymous> (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:1800927)
at Object.onceWrapper (node:events:646:26)
at ChildProcess.emit (node:events:538:35)
at ChildProcess._handle.onexit (node:internal/child_process:291:12)] {
category: 'jupyterconnection'
}
warn 18:28:29.392: No interpreter with path /Users/brandonl/tfx-env/bin/python3.7 found in Python API, will convert Uri path to string as Id file:///Users/brandonl/tfx-env/bin/python3.7
warn 18:28:29.393: No interpreter with path /Users/brandonl/tfx-env/bin/python3.7 found in Python API, will convert Uri path to string as Id file:///Users/brandonl/tfx-env/bin/python3.7
warn 18:28:29.393: No interpreter with path /Users/brandonl/tfx-env/bin/python3.7 found in Python API, will convert Uri path to string as Id file:///Users/brandonl/tfx-env/bin/python3.7
warn 18:28:29.394: No interpreter with path /Users/brandonl/tfx-env/bin/python3.7 found in Python API, will convert Uri path to string as Id file:///Users/brandonl/tfx-env/bin/python3.7
warn 18:28:29.394: No interpreter with path /Users/brandonl/tfx-env/bin/python3.7 found in Python API, will convert Uri path to string as Id file:///Users/brandonl/tfx-env/bin/python3.7
info 18:28:41.906: Disposing kernel .jvsc74a57bd0c098615e34024d68ded567e6f5a3455f01c2e2979cc9dc5678c0b113e3bee0d7./Users/brandonl/opt/anaconda3/envs/py39/python./Users/brandonl/opt/anaconda3/envs/py39/python.-m#ipykernel_launcher for notebook /Users/brandonl/projects/Hoeffding Tree/incremental_training.ipynb due to selection of another kernel or closing of the notebook
info 18:28:41.906: Dispose Kernel '/Users/brandonl/projects/Hoeffding Tree/incremental_training.ipynb' associated with '/Users/brandonl/projects/Hoeffding Tree/incremental_training.ipynb'
info 18:28:44.345: Starting Jupyter Session startUsingPythonInterpreter, .jvsc74a57bd0e35fdda99f4b0b07298ddcb38011fb8b5e284b0e28028673fda548debbaf536e./Users/brandonl/opt/anaconda3/bin/python3./Users/brandonl/opt/anaconda3/bin/python3.-m#ipykernel_launcher (Python Path: /Users/brandonl/opt/anaconda3, EnvType: Conda, EnvName: 'base', Version: 3.6.4 |Anaconda, Inc.| (default, Mar 12 2018, 20:05:31)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]) for '/Users/brandonl/projects/Hoeffding Tree/incremental_training.ipynb' (disableUI=false)
info 18:28:44.345: Checking for server existence.
info 18:28:44.345: Connecting to server
info 18:28:44.345: Launching server
info 18:28:44.346: Starting Notebook
info 18:28:44.347: Generating custom default config at /var/folders/22/f_6vk3095hd0wjpffqpdkrdc0000gn/T/66d6ab8d-edca-403c-b3e7-7bb21f4a160c/jupyter_notebook_config.py
Starting Jupyter from ~/opt/anaconda3/bin/python with arguments --no-browser --notebook-dir="/Users/brandonl/projects/Hoeffding Tree" --config=/var/folders/22/f_6vk3095hd0wjpffqpdkrdc0000gn/T/66d6ab8d-edca-403c-b3e7-7bb21f4a160c/jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0
info 18:28:44.352: Process Execution: > ~/opt/anaconda3/bin/python -m jupyter notebook --no-browser --notebook-dir="/Users/brandonl/projects/Hoeffding Tree" --config=/var/folders/22/f_6vk3095hd0wjpffqpdkrdc0000gn/T/66d6ab8d-edca-403c-b3e7-7bb21f4a160c/jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0
> ~/opt/anaconda3/bin/python -m jupyter notebook --no-browser --notebook-dir="/Users/brandonl/projects/Hoeffding Tree" --config=/var/folders/22/f_6vk3095hd0wjpffqpdkrdc0000gn/T/66d6ab8d-edca-403c-b3e7-7bb21f4a160c/jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0
[W 2023-02-02 18:28:45.164 LabApp] 'notebook_dir' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-02-02 18:28:45.164 LabApp] 'config_file' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[W 2023-02-02 18:28:45.164 LabApp] 'config_file' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[W 2023-02-02 18:28:45.164 LabApp] 'iopub_data_rate_limit' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-02-02 18:28:45.164 LabApp] 'iopub_data_rate_limit' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2023-02-02 18:28:45.167 LabApp] JupyterLab extension loaded from /Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/jupyterlab
[I 2023-02-02 18:28:45.167 LabApp] JupyterLab application directory is /Users/brandonl/opt/anaconda3/share/jupyter/lab
Traceback (most recent call last):
File "/Users/brandonl/opt/anaconda3/bin/jupyter-notebook", line 8, in <module>
sys.exit(main())
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 264, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 664, in launch_instance
app.start()
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 2321, in start
success = self._bind_http_server()
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1796, in _bind_http_server
return self._bind_http_server_unix() if self.sock else self._bind_http_server_tcp()
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1822, in _bind_http_server_tcp
self.http_server.listen(port, self.ip)
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/tornado/tcpserver.py", line 151, in listen
sockets = bind_sockets(port, address=address)
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/tornado/netutil.py", line 161, in bind_sockets
sock.bind(sockaddr)
OSError: [Errno 49] Can't assign requested address
warn 18:28:45.236: Error occurred while trying to start the kernel, options.disableUI=false [Er [Error]: Jupyter server crashed. Unable to connect.
Error code from Jupyter: 1
[W 2023-02-02 18:28:45.164 LabApp] 'notebook_dir' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-02-02 18:28:45.164 LabApp] 'config_file' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[W 2023-02-02 18:28:45.164 LabApp] 'config_file' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[W 2023-02-02 18:28:45.164 LabApp] 'iopub_data_rate_limit' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-02-02 18:28:45.164 LabApp] 'iopub_data_rate_limit' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2023-02-02 18:28:45.167 LabApp] JupyterLab extension loaded from /Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/jupyterlab
[I 2023-02-02 18:28:45.167 LabApp] JupyterLab application directory is /Users/brandonl/opt/anaconda3/share/jupyter/lab
Traceback (most recent call last):
File "/Users/brandonl/opt/anaconda3/bin/jupyter-notebook", line 8, in <module>
sys.exit(main())
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 264, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 664, in launch_instance
app.start()
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 2321, in start
success = self._bind_http_server()
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1796, in _bind_http_server
return self._bind_http_server_unix() if self.sock else self._bind_http_server_tcp()
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1822, in _bind_http_server_tcp
self.http_server.listen(port, self.ip)
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/tornado/tcpserver.py", line 151, in listen
sockets = bind_sockets(port, address=address)
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/tornado/netutil.py", line 161, in bind_sockets
sock.bind(sockaddr)
OSError: [Errno 49] Can't assign requested address
at Sm.rejectStartPromise (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:17:254981)
at t._complete (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:17:255541)
at t.n (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:700797)
at t.__tryOrUnsub (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:701037)
at t.complete (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:700930)
at t._complete (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:699446)
at t.complete (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:699145)
at ChildProcess.<anonymous> (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:1800927)
at Object.onceWrapper (node:events:646:26)
at ChildProcess.emit (node:events:538:35)
at ChildProcess._handle.onexit (node:internal/child_process:291:12)] {
category: 'jupyterconnection'
}
warn 18:28:45.236: Kernel Error, context = start [Er [Error]: Jupyter server crashed. Unable to connect.
Error code from Jupyter: 1
[W 2023-02-02 18:28:45.164 LabApp] 'notebook_dir' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-02-02 18:28:45.164 LabApp] 'config_file' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[W 2023-02-02 18:28:45.164 LabApp] 'config_file' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[W 2023-02-02 18:28:45.164 LabApp] 'iopub_data_rate_limit' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-02-02 18:28:45.164 LabApp] 'iopub_data_rate_limit' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2023-02-02 18:28:45.167 LabApp] JupyterLab extension loaded from /Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/jupyterlab
[I 2023-02-02 18:28:45.167 LabApp] JupyterLab application directory is /Users/brandonl/opt/anaconda3/share/jupyter/lab
Traceback (most recent call last):
File "/Users/brandonl/opt/anaconda3/bin/jupyter-notebook", line 8, in <module>
sys.exit(main())
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 264, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 664, in launch_instance
app.start()
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 2321, in start
success = self._bind_http_server()
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1796, in _bind_http_server
return self._bind_http_server_unix() if self.sock else self._bind_http_server_tcp()
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1822, in _bind_http_server_tcp
self.http_server.listen(port, self.ip)
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/tornado/tcpserver.py", line 151, in listen
sockets = bind_sockets(port, address=address)
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/tornado/netutil.py", line 161, in bind_sockets
sock.bind(sockaddr)
OSError: [Errno 49] Can't assign requested address
at Sm.rejectStartPromise (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:17:254981)
at t._complete (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:17:255541)
at t.n (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:700797)
at t.__tryOrUnsub (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:701037)
at t.complete (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:700930)
at t._complete (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:699446)
at t.complete (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:699145)
at ChildProcess.<anonymous> (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:1800927)
at Object.onceWrapper (node:events:646:26)
at ChildProcess.emit (node:events:538:35)
at ChildProcess._handle.onexit (node:internal/child_process:291:12)] {
category: 'jupyterconnection'
}
info 18:28:45.243: Process Execution: > ~/opt/anaconda3/bin/python3 -c "import ipykernel;print('6af208d0-cb9c-427f-b937-ff563e17efdf')"
> ~/opt/anaconda3/bin/python3 -c "import ipykernel;print('6af208d0-cb9c-427f-b937-ff563e17efdf')"
info 18:28:45.565: Dispose Kernel '/Users/brandonl/projects/Hoeffding Tree/incremental_training.ipynb' associated with '/Users/brandonl/projects/Hoeffding Tree/incremental_training.ipynb'
error 18:28:45.566: Error in execution [Er [Error]: Jupyter server crashed. Unable to connect.
Error code from Jupyter: 1
[W 2023-02-02 18:28:45.164 LabApp] 'notebook_dir' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-02-02 18:28:45.164 LabApp] 'config_file' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[W 2023-02-02 18:28:45.164 LabApp] 'config_file' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[W 2023-02-02 18:28:45.164 LabApp] 'iopub_data_rate_limit' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-02-02 18:28:45.164 LabApp] 'iopub_data_rate_limit' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2023-02-02 18:28:45.167 LabApp] JupyterLab extension loaded from /Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/jupyterlab
[I 2023-02-02 18:28:45.167 LabApp] JupyterLab application directory is /Users/brandonl/opt/anaconda3/share/jupyter/lab
Traceback (most recent call last):
File "/Users/brandonl/opt/anaconda3/bin/jupyter-notebook", line 8, in <module>
sys.exit(main())
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 264, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 664, in launch_instance
app.start()
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 2321, in start
success = self._bind_http_server()
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1796, in _bind_http_server
return self._bind_http_server_unix() if self.sock else self._bind_http_server_tcp()
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1822, in _bind_http_server_tcp
self.http_server.listen(port, self.ip)
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/tornado/tcpserver.py", line 151, in listen
sockets = bind_sockets(port, address=address)
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/tornado/netutil.py", line 161, in bind_sockets
sock.bind(sockaddr)
OSError: [Errno 49] Can't assign requested address
at Sm.rejectStartPromise (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:17:254981)
at t._complete (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:17:255541)
at t.n (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:700797)
at t.__tryOrUnsub (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:701037)
at t.complete (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:700930)
at t._complete (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:699446)
at t.complete (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:699145)
at ChildProcess.<anonymous> (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:1800927)
at Object.onceWrapper (node:events:646:26)
at ChildProcess.emit (node:events:538:35)
at ChildProcess._handle.onexit (node:internal/child_process:291:12)] {
category: 'jupyterconnection'
}
error 18:28:45.567: Error in execution (get message for cell) [Er [Error]: Jupyter server crashed. Unable to connect.
Error code from Jupyter: 1
[W 2023-02-02 18:28:45.164 LabApp] 'notebook_dir' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-02-02 18:28:45.164 LabApp] 'config_file' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[W 2023-02-02 18:28:45.164 LabApp] 'config_file' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[W 2023-02-02 18:28:45.164 LabApp] 'iopub_data_rate_limit' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-02-02 18:28:45.164 LabApp] 'iopub_data_rate_limit' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2023-02-02 18:28:45.167 LabApp] JupyterLab extension loaded from /Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/jupyterlab
[I 2023-02-02 18:28:45.167 LabApp] JupyterLab application directory is /Users/brandonl/opt/anaconda3/share/jupyter/lab
Traceback (most recent call last):
File "/Users/brandonl/opt/anaconda3/bin/jupyter-notebook", line 8, in <module>
sys.exit(main())
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 264, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 664, in launch_instance
app.start()
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 2321, in start
success = self._bind_http_server()
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1796, in _bind_http_server
return self._bind_http_server_unix() if self.sock else self._bind_http_server_tcp()
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1822, in _bind_http_server_tcp
self.http_server.listen(port, self.ip)
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/tornado/tcpserver.py", line 151, in listen
sockets = bind_sockets(port, address=address)
File "/Users/brandonl/opt/anaconda3/lib/python3.6/site-packages/tornado/netutil.py", line 161, in bind_sockets
sock.bind(sockaddr)
OSError: [Errno 49] Can't assign requested address
at Sm.rejectStartPromise (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:17:254981)
at t._complete (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:17:255541)
at t.n (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:700797)
at t.__tryOrUnsub (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:701037)
at t.complete (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:700930)
at t._complete (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:699446)
at t.complete (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:699145)
at ChildProcess.<anonymous> (/Users/brandonl/.vscode/extensions/ms-toolsai.jupyter-2023.1.2000312134/out/extension.node.js:2:1800927)
at Object.onceWrapper (node:events:646:26)
at ChildProcess.emit (node:events:538:35)
at ChildProcess._handle.onexit (node:internal/child_process:291:12)] {
category: 'jupyterconnection'
}
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 48 (15 by maintainers)
I had the same error and tried basically everything I could find online to fix it. After finally just force reinstalling it worked for me.
python3 -m pip install jupyter notebook -U --force-reinstall