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

Jupyter Notebook Kernel Not Connecting: Connection Failed after changing from 3.8.3 to 3.13.0 python #7589

Open
SanjeevYaswanth opened this issue Feb 18, 2025 · 5 comments
Labels
bug status:Needs Info status:Needs Triage Applied to issues that need triage

Comments

@SanjeevYaswanth
Copy link

  • Have both Python 3.8.3 and Python 3.13.0 version and respective jupyter packages.

  • Added Python 3.13.0 version to jupyter notebook kernel using ipykernel command.

  • Launched the Jupyter notebook using Python 3.8.3 version.

  • Now I'm changing the jupyter kernel from 3.8.3 to 3.13.0 . Facing below error in terminal and failed to connect the python 3.13.0 kernel attached image below.

  • With the help of below error, checked _bootstrap_external py file, it have _find_module_shim function/method.

[I 17:42:14.805 NotebookApp] Creating new notebook in 
[E 17:42:14.981 NotebookApp] Could not open static file ''
[W 17:42:15.641 NotebookApp] 404 GET /static/components/bootstrap-tour/build/css/bootstrap-tour.min.css (127.0.0.1) 14.120000ms referer=http://localhost:8889/notebooks/Untitled9.ipynb?kernel_name=python3
[W 17:42:15.673 NotebookApp] 404 GET /static/components/bootstrap-tour/build/css/bootstrap-tour.min.css (127.0.0.1) 1.170000ms referer=http://localhost:8889/notebooks/Untitled9.ipynb?kernel_name=python3
[W 17:42:16.119 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20250218174153 (127.0.0.1) 3.250000ms referer=http://localhost:8889/notebooks/Untitled9.ipynb?kernel_name=python3
[I 17:42:16.352 NotebookApp] Kernel started: 2ac91ba4-fe7f-4fc1-8d75-a4fa5be01f2f, name: python3
[I 17:42:31.946 NotebookApp] Creating new notebook in 
[W 17:42:32.481 NotebookApp] 404 GET /static/components/bootstrap-tour/build/css/bootstrap-tour.min.css (127.0.0.1) 1.650000ms referer=http://localhost:8889/notebooks/Untitled10.ipynb?kernel_name=python-3.13.0
[W 17:42:32.552 NotebookApp] 404 GET /static/components/bootstrap-tour/build/css/bootstrap-tour.min.css (127.0.0.1) 1.340000ms referer=http://localhost:8889/notebooks/Untitled10.ipynb?kernel_name=python-3.13.0
[W 17:42:32.888 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20250218174153 (127.0.0.1) 1.560000ms referer=http://localhost:8889/notebooks/Untitled10.ipynb?kernel_name=python-3.13.0
[I 17:42:32.956 NotebookApp] Kernel started: 80714420-93e0-4bb7-b4cf-5f77c6114e11, name: python-3.13.0
Could not import runpy module
Traceback (most recent call last):
  File "/lnx64/python-3.8.3/lib/python3.8/runpy.py", line 15, in <module>
    import importlib.util
  File "/lnx64/python-3.8.3/lib/python3.8/importlib/util.py", line 2, in <module>
    from . import abc
  File "/lnx64/python-3.8.3/lib/python3.8/importlib/abc.py", line 87, in <module>
    class PathEntryFinder(Finder):
  File "/lnx64/python-3.8.3/lib/python3.8/importlib/abc.py", line 126, in PathEntryFinder
    find_module = _bootstrap_external._find_module_shim
AttributeError: module 'importlib._bootstrap_external' has no attribute '_find_module_shim'

Image

@SanjeevYaswanth SanjeevYaswanth added bug status:Needs Triage Applied to issues that need triage labels Feb 18, 2025
@andrii-i
Copy link
Contributor

andrii-i commented Feb 18, 2025

Hi @SanjeevYaswanth. Thank you for creating this issue. Could you please advise which version of Notebook you are using? You can check it via jupyter --version.

@SanjeevYaswanth
Copy link
Author

Hi @andrii-i Thanks for a quick response.
In Python 3.13.0- notebook version is 7.3.2
In Python 3.8.3 - notebook version is 6.4.5

@jsosa2310

This comment has been minimized.

@RRosio
Copy link
Collaborator

RRosio commented Feb 25, 2025

@SanjeevYaswanth could you share if you are using a virtual environment manager? A quick search online for the error you are seeing (Could not import runpy module) gives a few hit that you may consider exploring: https://stackoverflow.com/questions/44463879/could-not-import-runpy-module.

@andrii-i
Copy link
Contributor

andrii-i commented Mar 4, 2025

@SanjeevYaswanth could you please provide detailed step-by-step reproduction instructions including commands you've used to install 3.13.0 kernel inside 3.8 environment? You can copy the output of jupyter kernelspec list --json here so we could see the detailed information about the kernels used. Please remember to sanitize any secrets before sharing the output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug status:Needs Info status:Needs Triage Applied to issues that need triage
Projects
None yet
Development

No branches or pull requests

4 participants