It is really simple in newer Jupyter:

%run MyOtherNotebook.ipynb

See here for details.

Official docs: %run IPython magic command

Answer from johndodo on Stack Overflow
🌐
GitHub
github.com › ipython › ipynb
GitHub - ipython/ipynb: Package / Module importer for importing code from Jupyter Notebook files (.ipynb) · GitHub
A python package providing an easy way to explicitly import Jupyter Notebooks files (.ipynb) the same way you would import regular .py files.
Discussions

How do I import .ipynb Files?
Not exactly what you want but might solve your problem anyways since you just want to reuse code from another notebook is to just save your code as a .py file, and run your file using the %magic command. Run a cell with: %run -i myCode.py More on reddit.com
🌐 r/Jupyter
2
3
June 5, 2018
python - Jupyter Notebook: Import .ipynb file and access it's method in other .ipynb file giving error - Stack Overflow
Created an .ipynb file to import Jupyter Notebook from the Jupyter link given above. Say, importer.ipynb. ... Test step abc.__name__ results in abc as output. More on stackoverflow.com
🌐 stackoverflow.com
How to import functions from a .py file into a .ipynb file?
Well why are you trying to import from make_dataset if that is not the file name? You should import from whatever the file name actually is. More on reddit.com
🌐 r/learnpython
3
2
September 12, 2023
Trying to use a class in one Jupyter notebook in another; nothing I've tried works
How about putting the class to a .py file and importing that in both notebooks? More on reddit.com
🌐 r/learnpython
9
1
October 18, 2022
🌐
Interactive Brokers
interactivebrokers.com › campus › ibkr-quant-news › python-importing-an-ipynb-file-jupyter-notebook-from-another-ipynb-file
Python: Importing an ipynb File (Jupyter Notebook) from Another ipynb File
February 9, 2023 - To import an ipynb file in another ipynb file, we need to install import-ipynb python package which is apapted exactly to our purpose. Install import-ipynb library from the command prompt !pip install import-ipynb Import it from your notebook ...
🌐
YouTube
youtube.com › amit thinks
How to Import ipynb file in Jupyter Notebook Anaconda (2022) - YouTube
Learn how to easily import ipynb file in Jupyter Notebook Anaconda. To Install Anaconda (Python) and Jupyter Notebook on Windows 10, refer the below video:ht...
Published: March 23, 2022
Views: 67K
🌐
YouTube
youtube.com › watch
How to Import an IPython `.ipynb` File in Jupyter Notebook (Anaconda) - YouTube
How to Import an IPython `.ipynb` File in Jupyter Notebook (Anaconda) | Step-by-Step GuideHave an `.ipynb` file you want to open in **Jupyter Notebook using ...
Published: May 29, 2025
🌐
Reddit
reddit.com › r/jupyter › how do i import .ipynb files?
r/Jupyter on Reddit: How do I import .ipynb Files?
June 5, 2018 -

I want to reuse code from an .ipynb file I created with jupyter notebook, but the documentation for importing those files into other ipynb files is really hard for me to understand.

[http://nbviewer.jupyter.org/github/jupyter/notebook/blob/master/docs/source/examples/Notebook/Importing%20Notebooks.ipynb ] Can someone help me?

🌐
Deepnote
deepnote.com › docs › importing-and-exporting-jupyter-notebooks
Working with Jupyter notebooks - Deepnote docs
Deepnote is compatible with core Jupyter notebook functionalities. There are two ways to import .ipynb files into a Deepnote project:
🌐
Jupyter Notebook
jupyter-notebook.readthedocs.io › en › stable › examples › Notebook › Importing Notebooks.html
Importing Jupyter Notebooks as Modules — Jupyter Notebook 7.6.3 documentation
""" name = fullname.rsplit('.', 1)[-1] if not path: path = [''] for d in path: nb_path = os.path.join(d, name + ".ipynb") if os.path.isfile(nb_path): return nb_path # let import Notebook_Name find "Notebook Name.ipynb" nb_path = nb_path.replace("_", " ") if os.path.isfile(nb_path): return nb_path · Here we have our Notebook Loader. It’s actually quite simple - once we figure out the filename of the module, all it does is:
Find elsewhere
🌐
Bobby Hadz
bobbyhadz.com › blog › import-jupyter-ipynb-file-from-another-ipynb-file
Import Jupyter ipynb file from another ipynb file | bobbyhadz
In this case, the file can either have a .ipynb or .ipy extension. If you run into issues, try to restart your Jupyter Notebook server. You can also use the import-ipynb package to import a Jupyter ipynb file from another ipynb file.
🌐
GitHub
gist.github.com › jkarakas › e8f1ec281fe7b8bc92650973fd44bda4
Import(run) a ipynb file from another folder in a jupyter notebook · GitHub
Import(run) a ipynb file from another folder in a jupyter notebook - Import(run) a ipynb file from another folder in a jupyter notebook.ipynb
🌐
PyPI
pypi.org › project › import-ipynb
import-ipynb
JavaScript is disabled in your browser. Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
🌐
Saturn Cloud
saturncloud.io › blog › how-to-import-jupyter-notebooks-to-another-jupyter-notebook
How to Import Jupyter Notebooks to Another Jupyter Notebook | Saturn Cloud Blog
May 1, 2026 - Using the import_ipynb module - The import_ipynb module allows you to import a Jupyter Notebook as a module and use its code in another notebook. To use the %run command, simply type %run followed by the file path of the notebook you want to import.
🌐
Medium
mmrraju.medium.com › how-to-import-an-ipynb-from-another-ipynb-file-in-jupyter-noot-book-221bdbb5e9d5
How to import an ipynb from another ipynb file in jupyter note book??
June 13, 2021 - Jupyter Notebook · Ipynb · Mostafejur Rahman · Jun 13, 2021 · -- Listen · Share · How to import an ipynb from another ipynb file in jupyter note book?? Let’s install · !pip install ipynb · Then, from ipynb.fs.full. File_name import ...
🌐
HKUST Digital Humanities Initiative
digitalhumanities.hkust.edu.hk › home › tutorials › how to open .ipynb file (jupyter notebook)
How to open .ipynb file (Jupyter Notebook) - HKUST Digital Humanities Initiative
July 17, 2026 - .ipynb stands for Interactive Python Notebook, the file format of Jupyter Notebook. This article demonstrate how to use Google Colab, Anaconda, and VS Code to open these files.
🌐
PyPI
pypi.org › project › importnb
importnb imports notebooks as python modules.
the commands below execute a notebook module and file respectively. importnb -m Untitled # call the Untitled module as __main__ importnb Untitled.ipynb # call the Untitled file as __main__ ... translates Jupyter notebook files (ie .ipynb files) ...
      » pip install importnb
    
Published: Nov 02, 2023
Version: 2023.11.1
🌐
Gitbook
stephanosterburg.gitbook.io › scrapbook › data-science › jupiter-notebook-tips-and-tricks
Jupiter Notebook Tips & Tricks | scrapbook
February 20, 2019 - We can also import and use modules from python files. ... The shell is a way to interact textually with the computer. The most popularUnix shell is Bash(Bourne Again SHell ). Bash is the default shell on most modern implementations of Unix and in most packages that provide Unix-like tools for Windows. Now, when we work with any Python interpreter, we need to regularly switch between the shell and the IDLE, in case we need to use the command line tools. However, the Jupyter Notebook gives us the ease to execute shell commands from within the notebook by placing an extra !before the commands.
🌐
YouTube
youtube.com › watch
How to upload and open Jupyter Notebook ipynb File in Google Colab tutorial - YouTube
How to import and use jupyter notebook file in google colab is shown#googlecolab #jupyternotebook
Published: October 26, 2023
🌐
Deepnote
deepnote.com › guides › jupyter › how-to-import-a-jupyter-notebook
How to import a Jupyter notebook
March 6, 2024 - ... Navigate to the 'Projects' tab and click on the project you wish to open. ... Locate the 'Files' sidebar on the left-hand side of the project workspace. Drag and drop the Jupyter notebook file (`.ipynb`) from your ...
🌐
Interactive Brokers
interactivebrokers.com › campus › ibkr-quant-news › python-run-to-import-another-folders-ipynb-files
Python: %run to Import Another Folder’s ipynb Files
February 9, 2023 - This post shows how to use %run command for importing Jupyter Notebook (ipynb) files from another folders. It is essentially to run the imported ipynb files before running a main file.