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

Extension Error - Could not import extension nbsphinx_link #13433

Closed
sahilk45 opened this issue Mar 17, 2025 · 2 comments
Closed

Extension Error - Could not import extension nbsphinx_link #13433

sahilk45 opened this issue Mar 17, 2025 · 2 comments
Labels
extensions:third party Relating to third-party extensions

Comments

@sahilk45
Copy link

Describe the bug

I encountered an error while trying to build my Sphinx documentation using sphinx-build -b html . _build. The build process fails with an ExtensionError, stating that the nbsphinx_link module is missing.

Running Sphinx v8.2.3
loading translations [en]... done

Extension error!

Versions

  • Platform: win32; (Windows-11-10.0.22631-SP0)
  • Python version: 3.13.2 (CPython)
  • Sphinx version: 8.2.3
  • Docutils version: 0.21.2
  • Jinja2 version: 3.1.6
  • Pygments version: 2.19.1

Traceback

  File "C:\Users\HP\AppData\Local\Programs\Python\Python313\Lib\site-packages\sphinx\registry.py", line 544, in load_extension     
    raise ExtensionError(
        __('Could not import extension %s') % extname, err
    ) from err
sphinx.errors.ExtensionError: Could not import extension nbsphinx_link (exception: No module named 'nbsphinx_link')

The full traceback has been saved in:
C:\Users\HP\AppData\Local\Temp\sphinx-err-g4t7ub7z.log

How to Reproduce

  1. Run the command :

sphinx-build -b html . _build
2.The build process fails with the above error.

Environment Information

Operating System: Windows 11 (Version 22631)
Python Version: 3.13.2 (CPython)
Sphinx Version: 8.2.3
Docutils Version: 0.21.2
Jinja2 Version: 3.1.6
Pygments Version: 2.19.1

Sphinx extensions

Additional context

Possible Fix / Workaround
Manually installing the missing extension (nbsphinx_link) using:

pip install nbsphinx_link

resolved the issue.

Could this missing dependency be added to the documentation or a clearer error message be provided? Let me know if any additional details are needed.

Thanks!

@AA-Turner
Copy link
Member

nbsphinx-link is a third party dependency, please create an issue with that project.

A

@AA-Turner AA-Turner closed this as not planned Won't fix, can't repro, duplicate, stale Mar 18, 2025
@AA-Turner AA-Turner added extensions:third party Relating to third-party extensions and removed type:bug labels Mar 18, 2025
@mgeier
Copy link
Contributor

mgeier commented Mar 18, 2025

As far as I understood the issue description, the problem is that it's not clear from the error message that the nbsphinx-link package has to be installed.

This happens without nbsphinx-link being installed, therefore it cannot be an issue with that project, right?
(except for documentation, see below)

It sounds like a Sphinx issue to me, but I don't know if there is a feasible course of action for this ...

I think the problem is that the module name and the PyPI package name are sometimes (often?) different, and Sphinx knows only the former and can therefore give no hints on how to install the latter.

(Part of) the problem might also be a documentation problem, since the README in https://github.com/vidartf/nbsphinx-link/ states "Install the package", but it doesn't state how to do that (nor how the PyPI package is actually named, thought the first guess would likely be right).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extensions:third party Relating to third-party extensions
Projects
None yet
Development

No branches or pull requests

3 participants