Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not connect to Python Kernel from Jupyter notebook. #24106

Closed
gcapnias opened this issue Aug 9, 2023 · 2 comments
Closed

Can not connect to Python Kernel from Jupyter notebook. #24106

gcapnias opened this issue Aug 9, 2023 · 2 comments

Comments

@gcapnias
Copy link

gcapnias commented Aug 9, 2023

Type: Bug

I have a new Azure Data Studio installation (per machine installation) v1.45.1.

I open an empty folder and I create a Jupyter notebook. I select Python3 from Kernel dropdown. Azure Data Studio prompts to create a new Python installation. I accept the default settings and an installation starts.

In Output window, in Notebooks I see that the installation of Jupiter Notebooks completed successfully. I receive a popup that installation was completed successfully.
In the Output window, I can see that Azure Data Studio issues a command to start Jupyter Notebook. I receive an error:

Failed to change kernel. Kernel SQL will be used. Error was:
Notebook process exited prematurely with error code: 1. StdErr Output: Traceback (most recent call last): File "c:\Program Files\Azure Data Studio\resources\pythonScripts\startNotebook.py", line 1, in <module> import notebook.notebookapp'.

I issued the same command - from output window - in command prompt and I get the error:

C:\Users\gcapnias>"C:\Users\gcapnias\azuredatastudio-python\python.exe" "c:\Program Files\Azure Data Studio\resources\app\extensions\notebook\resources\pythonScripts\startNotebook.py" --no-browser --ip=127.0.0.1  --no-mathjax --notebook-dir "c:\Repository" --NotebookApp.token=9fa5a3bdf01d6d103b1746070804c8fcbb29fd4018fabd79
Traceback (most recent call last):
  File "c:\Program Files\Azure Data Studio\resources\app\extensions\notebook\resources\pythonScripts\startNotebook.py", line 1, in <module>
    import notebook.notebookapp
ModuleNotFoundError: No module named 'notebook.notebookapp'

I have issued the command

C:\> "C:\Users\gcapnias>"C:\Users\gcapnias\azuredatastudio-python\python.exe" -m pip install jupyter

and I verified the installation of Jupyter Notebook

I can start Jupiter Notebook from command-line with the command:

C:\> "C:\Users\gcapnias\azuredatastudio-python\python.exe" -m notebook

How can I fix my installation in order to work Jupyter Notebooks with Azure Data Studio?

Thanks in advance,
George J.

Azure Data Studio version: azuredatastudio 1.45.1 (88c21b1, 2023-08-03T00:42:37.945Z)
OS version: Windows_NT x64 10.0.19045
Restricted Mode: No
Preview Features: Enabled
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz (2 x 2592)
GPU Status 2d_canvas: unavailable_software
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: disabled_off
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: unavailable_software
Load (avg) undefined
Memory (System) 4.00GB (1.28GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (1)
Extension Author (truncated) Version
azuredatastudio-postgresql Mic 0.5.0
@duanepfeiffer
Copy link

I'm having the same issue.

@lucyzhang929
Copy link
Contributor

Closing this as a duplicate of #23945.
Please try downgrading the notebook package to v6.5.5 as a workaround.

pip3 install notebook==6.5.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants