vscode-jupyter: Failed to connect to Jupyter notebook. http://localhost:8888/ Error: Kernel Python 3.8.2 64-bit is not usable
Environment data
- VS Code version: 1.53.2
- Jupyter Extension version (available under the Extensions sidebar): 2021.2.576440691
- Python Extension version (available under the Extensions sidebar): XXX
- OS (Windows | Mac | Linux distro) and version: Ubuntu
- Python and/or Anaconda version: Python 3.8
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
- Jupyter server running: Local
Expected behaviour
Connected to local server with Jupyter Output
[I 14:29:48.777 NotebookApp] Kernel started: 338c25d0-39b3-4471-ad33-f627d59f74aa, name: python38264bit58e42c9575d24eb58f427896571571af
[W 14:29:48.788 NotebookApp] delete /t-b3b6f7a6-c9f1-4c28-84cb-28f8cdabd1df.ipynb
[I 14:29:48.820 NotebookApp] Kernel started: 067ec0a0-cc2c-4541-8aff-33a871976ced, name: python38264bit58e42c9575d24eb58f427896571571af
[I 14:29:48.837 NotebookApp] Kernel started: f4461f07-e284-4d9a-b1a7-76cac9119f47, name: python38264bit58e42c9575d24eb58f427896571571af
[I 14:29:48.850 NotebookApp] Kernel started: 272852be-dc17-4ae8-946b-01975f13b72f, name: python38264bit58e42c9575d24eb58f427896571571af
[W 14:29:48.857 NotebookApp] delete /t-09a9a685-7aac-4af9-b7e4-020ea85e2ae7.ipynb
[W 14:29:48.873 NotebookApp] delete /t-e90d39e7-d365-4b7a-8b73-be2321f10b02.ipynb
[W 14:29:48.882 NotebookApp] delete /t-bf1c6aac-2e4d-4df2-b73c-6fdd12c2be6b.ipynb
[I 14:29:49.397 NotebookApp] Creating new notebook in /
[I 14:29:49.408 NotebookApp] Creating new notebook in /
[I 14:29:49.419 NotebookApp] Creating new notebook in /
> /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
> /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
> /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
> /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
> /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
> /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
[I 14:29:49.796 NotebookApp] Kernel started: 3066b5cf-3b26-4e8b-addb-decca5a8f149, name: python38264bit58e42c9575d24eb58f427896571571af
[I 14:29:49.807 NotebookApp] Kernel started: d6314ca0-3282-444f-930b-b9af5f0cc30a, name: python38264bit58e42c9575d24eb58f427896571571af
[W 14:29:49.812 NotebookApp] delete /t-34ce1030-237e-4f93-9baa-442d3c623a5f.ipynb
[W 14:29:49.819 NotebookApp] delete /t-afa95c44-aa2d-4445-b730-166dc4d510dc.ipynb
[I 14:29:49.844 NotebookApp] Kernel started: 87b79135-bd17-4fa4-90e3-241b0c055923, name: python38264bit58e42c9575d24eb58f427896571571af
[W 14:29:49.850 NotebookApp] delete /t-7d13316e-0052-4d33-9ed9-7dbf07a77c8d.ipynb
Actual behaviour
Failed to connect to Jupyter notebook. http://localhost:8888/ Error: Kernel Python 3.8.2 64-bit is not usable with Jupyter Output
Starting Jupyter from /usr/bin/python3 with command line --no-browser --notebook-dir="/home/ubuntu/Tasks/Python/stock_amibroker" --config=/tmp/f8410491-94a9-479d-a09c-210cba1fa93d/jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0
> /usr/bin/python3 (daemon) -m jupyter notebook --no-browser --notebook-dir="/home/ubuntu/Tasks/Python/stock_amibroker" --config=/tmp/f8410491-94a9-479d-a09c-210cba1fa93d/jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0
> /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py pip list
> /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py pip list
[I 14:48:10.502 NotebookApp] The port 8888 is already in use, trying another port.
[I 14:48:10.503 NotebookApp] Serving notebooks from local directory: /home/ubuntu/Tasks/Python/stock_amibroker
[I 14:48:10.503 NotebookApp] Jupyter Notebook 6.2.0 is running at:
[I 14:48:10.504 NotebookApp] http://localhost:8889/?token=417186c78c21fdc78626a84360e3d869d320b29270e75a66
> /usr/bin/python3 (daemon) ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/vscode_datascience_helpers/getServerInfo.py
[I 14:48:10.504 NotebookApp] or http://127.0.0.1:8889/?token=417186c78c21fdc78626a84360e3d869d320b29270e75a66
> /usr/bin/python3 (daemon) ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/vscode_datascience_helpers/getServerInfo.py
[I 14:48:10.504 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 14:48:10.506 NotebookApp]
To access the notebook, open this file in a browser:
file:///home/ubuntu/.local/share/jupyter/runtime/nbserver-22281-open.html
Or copy and paste one of these URLs:
http://localhost:8889/?token=417186c78c21fdc78626a84360e3d869d320b29270e75a66
or http://127.0.0.1:8889/?token=417186c78c21fdc78626a84360e3d869d320b29270e75a66
[I 14:48:10.673 NotebookApp] Creating new notebook in /
> /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
> /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py -c "import ipykernel"
> /usr/bin/python3 (daemon) ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/vscode_datascience_helpers/getServerInfo.py
> /usr/bin/python3 (daemon) ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/vscode_datascience_helpers/getServerInfo.py
[I 14:48:10.997 NotebookApp] Kernel started: 929a4891-8476-4fba-8ea8-daef87f1872d, name: python38264bit58e42c9575d24eb58f427896571571af
[W 14:48:11.010 NotebookApp] delete /t-560f0799-3118-4edf-8ceb-35a206222340.ipynb
[I 14:48:13.999 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
[I 14:48:17.011 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports
[I 14:48:20.023 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports
[I 14:48:23.031 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
[W 14:48:26.040 NotebookApp] KernelRestarter: restart failed
[W 14:48:26.041 NotebookApp] Kernel 929a4891-8476-4fba-8ea8-daef87f1872d died, removing from map.
Error 2021-02-24 14:48:30: Kernel died while waiting for idle
Error 2021-02-24 14:48:30: Failed to change kernel [c [Error]: Kernel is not usable. Check the Jupyter output tab for more information.
at n (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:9:176843)
at r (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:9:176965)
at o (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/node_modules/@jupyterlab/services.js:1:57939)
at Object.e.emit (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/node_modules/@jupyterlab/services.js:1:57653)
at e.emit (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/node_modules/@jupyterlab/services.js:1:55890)
at c.dispose (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/node_modules/@jupyterlab/services.js:3:540973)
at /home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/node_modules/@jupyterlab/services.js:3:545409
at Object.t.each (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/node_modules/@jupyterlab/services.js:1:63056)
at m (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/node_modules/@jupyterlab/services.js:3:545325)
at /home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/node_modules/@jupyterlab/services.js:3:544204
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async t.SessionManager.requestRunning (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/node_modules/@jupyterlab/services.js:3:537695)] {
category: 'invalidkernel',
kernelConnectionMetadata: {
kernelModel: {
_createSocket: [Function],
_onWSOpen: [Function],
_onWSMessage: [Function],
_onWSClose: [Function],
_id: '929a4891-8476-4fba-8ea8-daef87f1872d',
_name: 'python38264bit58e42c9575d24eb58f427896571571af',
_status: 'dead',
_kernelSession: '',
_clientId: 'aff3e05c-5df1-4a5c-a77d-99d9398c9dc3',
_isDisposed: true,
_wsStopped: true,
_ws: null,
_username: '',
_reconnectLimit: 7,
_reconnectAttempt: 0,
_isReady: false,
_readyPromise: [e],
_initialized: false,
_futures: Map {},
_comms: Map {},
_targetRegistry: [Object: null prototype] {},
_info: null,
_pendingMessages: [],
_statusChanged: [e],
_iopubMessage: [e],
_anyMessage: [e],
_unhandledMessage: [e],
_displayIdToParentIds: Map {},
_msgIdToDisplayIds: Map {},
_terminated: [e],
_msgChain: null,
_noOp: [Function],
serverSettings: [Object],
handleComms: true,
lastActivityTime: 2021-02-24T08:48:30.709Z,
numberOfConnections: 0,
session: [Object]
},
kind: 'connectToLiveKernel'
}
}
Error 2021-02-24 14:48:30: Failed to connect to server [c [Error]: Kernel Python 3.8.2 64-bit is not usable. Check the Jupyter output tab for more information.
at w.createNewKernelSession (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:554995)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async w.connect (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:554404)
at async m.startNew (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:549756)
at async _.connect (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:520500)
at async /home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:32:653463] {
category: 'invalidkernel',
kernelConnectionMetadata: {
kind: 'startUsingKernelSpec',
interpreter: {
architecture: 3,
path: '/usr/bin/python3',
version: [Object],
sysVersion: '3.8.5 (default, Jul 28 2020, 12:59:40) \n[GCC 9.3.0]',
sysPrefix: '/usr',
fileHash: '305d49160542eaf90f0dae709d25bc0d0cf8e656008a94b2f98254f35bcb4c5d4160e1cfe46b8e76e9dc95d09946f2e706fffece8a6bd8921376447da05ea710',
envType: 'Unknown',
displayName: 'Python 3.8.5 64-bit'
},
kernelSpec: a {
specFile: '/home/ubuntu/.local/share/jupyter/kernels/python38264bit58e42c9575d24eb58f427896571571af/kernel.json',
interpreterPath: '/usr/bin/python3',
name: 'python38264bit58e42c9575d24eb58f427896571571af',
argv: [Array],
language: 'python',
path: '/usr/bin/python3',
display_name: 'Python 3.8.2 64-bit',
metadata: [Object],
env: {},
interrupt_mode: undefined
}
}
}
Error 2021-02-24 14:48:30: Exception attempting to start notebook: [i [Error]:
at new t.WrappedError (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:1:153031)
at /home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:32:654636
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Error: Kernel Python 3.8.2 64-bit is not usable. Check the Jupyter output tab for more information.
at w.createNewKernelSession (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:554995)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async w.connect (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:554404)
at async m.startNew (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:549756)
at async _.connect (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:520500)
at async /home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:32:653463] {
category: 'invalidkernel',
originalException: [c [Error]: Kernel Python 3.8.2 64-bit is not usable. Check the Jupyter output tab for more information.
at w.createNewKernelSession (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:554995)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async w.connect (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:554404)
at async m.startNew (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:549756)
at async _.connect (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:520500)
at async /home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:32:653463] {
category: 'invalidkernel',
kernelConnectionMetadata: {
kind: 'startUsingKernelSpec',
interpreter: [Object],
kernelSpec: [a]
}
}
}
Error 2021-02-24 14:48:30: DataScience Error [i [Error]:
at new t.WrappedError (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:1:153031)
at /home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:32:654636
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Error: Kernel Python 3.8.2 64-bit is not usable. Check the Jupyter output tab for more information.
at w.createNewKernelSession (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:554995)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async w.connect (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:554404)
at async m.startNew (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:549756)
at async _.connect (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:520500)
at async /home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:32:653463] {
category: 'invalidkernel',
originalException: [c [Error]: Kernel Python 3.8.2 64-bit is not usable. Check the Jupyter output tab for more information.
at w.createNewKernelSession (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:554995)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async w.connect (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:554404)
at async m.startNew (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:549756)
at async _.connect (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:520500)
at async /home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:32:653463] {
category: 'invalidkernel',
kernelConnectionMetadata: {
kind: 'startUsingKernelSpec',
interpreter: [Object],
kernelSpec: [a]
}
}
}
> /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
- That’s my one repository linked with github. I am able to run Notebook from other folder or directory but getting error when running notebook from this repository. I cloned the same repository to another directory and issue remains.
Logs
Output for Jupyter
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Jupyter
)
Error 2021-02-24 14:19:05: DataScience Error [i [Error]:
at new t.WrappedError (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:1:153031)
at /home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:32:654636
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Error: Kernel Python 3.8.2 64-bit is not usable. Check the Jupyter output tab for more information.
at w.createNewKernelSession (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:554995)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async w.connect (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:554404)
at async m.startNew (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:549756)
at async _.connect (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:520500)
at async /home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:32:653463] {
category: 'invalidkernel',
originalException: [c [Error]: Kernel Python 3.8.2 64-bit is not usable. Check the Jupyter output tab for more information.
at w.createNewKernelSession (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:554995)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async w.connect (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:554404)
at async m.startNew (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:549756)
at async _.connect (/home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:49:520500)
at async /home/ubuntu/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/out/client/extension.js:32:653463] {
category: 'invalidkernel',
kernelConnectionMetadata: {
kind: 'startUsingKernelSpec',
interpreter: [Object],
kernelSpec: [a]
}
}
}
> /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /usr/bin/python3 ~/.vscode/extensions/ms-toolsai.jupyter-2021.2.576440691/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (8 by maintainers)
Thanks for the bug.
It looks to me like the kernel can’t be run by jupyter. If you attempt starting jupyter using the same kernel outside of VS code it might give you more information as to why. To do so you’d:
jupyter notebook
python38264bit58e42c9575d24eb58f427896571571af
kernelAdditionally if you could set this setting:
That should show a lot more output in the ‘jupyter’ output tab in VS code.