ipynb

raw JSON →
0.5.1 verified Fri May 01 auth: no python

Package / Module importer for importing code from Jupyter Notebook files (.ipynb). Currently at version 0.5.1, with low release cadence. Allows importing Jupyter notebooks as Python modules.

pip install ipynb
error ModuleNotFoundError: No module named 'ipynb'
cause ipynb is not installed.
fix
Run pip install ipynb.
error ImportError: cannot import name 'load_notebook_module' from 'ipynb'
cause The function does not exist in older versions or typo in name.
fix
Use from ipynb import load_notebook_module (correct) or check version.
gotcha The `ipynb` package uses sys.path hooks and may interfere with regular imports if not used carefully.
fix Only enable when needed, or use `ipynb.load_notebook_module` directly.
gotcha Notebook files must be in the same directory or on sys.path.
fix Ensure your .ipynb files are importable by placing them in your current working directory or adjusting sys.path.

Enable importing .ipynb files as modules.

import ipynb
# Enable notebook importing
ipynb.enable()
import my_notebook  # imports my_notebook.ipynb