{"id":19129742,"url":"https://github.com/mathworks/jupyter-matlab-proxy","last_synced_at":"2025-05-15T06:05:05.003Z","repository":{"id":37715557,"uuid":"321637401","full_name":"mathworks/jupyter-matlab-proxy","owner":"mathworks","description":"MATLAB Integration for Jupyter enables you to run MATLAB code in Jupyter Notebooks and other Jupyter environments. You can also open MATLAB in a browser directly from your Jupyter environment to use more MATLAB features.","archived":false,"fork":false,"pushed_at":"2025-05-12T08:49:48.000Z","size":5244,"stargazers_count":319,"open_issues_count":12,"forks_count":39,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-05-12T10:01:14.132Z","etag":null,"topics":["jupyter","jupyter-matlab-proxy","matlab-jupyter","tljh-plugin"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathworks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-12-15T10:48:12.000Z","updated_at":"2025-05-12T08:49:52.000Z","dependencies_parsed_at":"2023-02-15T10:01:46.916Z","dependency_job_id":"dbc3c333-a6d7-4f59-a53f-3c74a7152fa1","html_url":"https://github.com/mathworks/jupyter-matlab-proxy","commit_stats":{"total_commits":170,"total_committers":18,"mean_commits":9.444444444444445,"dds":0.6529411764705882,"last_synced_commit":"f9c0a9a52a255c8298cf50eccd1ec43aa6e3ea2a"},"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks%2Fjupyter-matlab-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks%2Fjupyter-matlab-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks%2Fjupyter-matlab-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks%2Fjupyter-matlab-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathworks","download_url":"https://codeload.github.com/mathworks/jupyter-matlab-proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253717586,"owners_count":21952514,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jupyter","jupyter-matlab-proxy","matlab-jupyter","tljh-plugin"],"created_at":"2024-11-09T06:08:23.166Z","updated_at":"2025-05-15T06:05:04.983Z","avatar_url":"https://github.com/mathworks.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MATLAB Integration _for Jupyter_\n\n[![PyPI badge](https://img.shields.io/pypi/v/jupyter-matlab-proxy.svg?logo=pypi)](https://pypi.python.org/pypi/jupyter-matlab-proxy) [![codecov](https://codecov.io/gh/mathworks/jupyter-matlab-proxy/branch/main/graph/badge.svg?token=ZW3SESKCSS)](https://codecov.io/gh/mathworks/jupyter-matlab-proxy) [![Downloads](https://static.pepy.tech/personalized-badge/jupyter-matlab-proxy?period=month\u0026units=international_system\u0026left_color=grey\u0026right_color=blue\u0026left_text=PyPI%20downloads/month)](https://pepy.tech/project/jupyter-matlab-proxy)\n\n\n\nRun MATLAB® code in Jupyter® environments such as Jupyter notebooks, JupyterLab, and JupyterHub.\n\n\n## Table of Contents\n- [MATLAB Integration _for Jupyter_](#matlab-integration-for-jupyter)\n  - [Table of Contents](#table-of-contents)\n  - [Features of MATLAB Integration _for Jupyter_](#features-of-matlab-integration-for-jupyter)\n  - [Requirements](#requirements)\n  - [Install](#install)\n    - [Install from PyPI](#install-from-pypi)\n    - [Build from Source](#build-from-source)\n    - [Using VS Code](#using-vs-code)\n    - [Using JupyterHub and The Littlest JupyterHub](#using-jupyterhub-and-the-littlest-jupyterhub)\n    - [Using Simulink](#using-simulink)\n    - [Troubleshooting](#troubleshooting)\n  - [Get Started](#get-started)\n  - [Run MATLAB Code in a Jupyter Notebook](#run-matlab-code-in-a-jupyter-notebook)\n    - [Notes](#notes)\n  - [Open MATLAB in a Browser](#open-matlab-in-a-browser)\n  - [Edit MATLAB Files in JupyterLab](#edit-matlab-files-in-jupyterlab)\n  - [Limitations](#limitations)\n\n\n## Features of MATLAB Integration _for Jupyter_\n\nYou can use this package to run MATLAB code in Jupyter notebooks and JupyterLab.\n\n\u003cp\u003e\u003cimg width=\"600\" src=\"https://github.com/mathworks/jupyter-matlab-proxy/raw/main/img/JupyterKernel.gif\"\u003e\u003c/p\u003e\n\nFrom your Jupyter notebook or JupyterLab, you can also open the MATLAB development environment in your browser to access more MATLAB features.\n\n\u003cp\u003e\u003cimg width=\"600\" src=\"https://github.com/mathworks/jupyter-matlab-proxy/raw/main/img/JupyterMATLABDesktop.gif\"\u003e\u003c/p\u003e\n\n## Requirements\n\n* Supported operating systems:\n  - Linux®\n  - MacOS\n  - Windows® (supported from [v0.6.0](https://github.com/mathworks/jupyter-matlab-proxy/releases/tag/v0.6.0)).\n  - Windows Subsystem for Linux (WSL 2) [Installation Guide](https://github.com/mathworks/jupyter-matlab-proxy/blob/main/install_guides/wsl2/README.md).\n\n* Python versions: 3.8 | 3.9 | 3.10 | 3.11\n\n* MATLAB R2020b or later, installed and on the system PATH.\n  ```bash\n  # Confirm MATLAB is on the PATH\n  which matlab\n  ```\n  Note: You only need MATLAB installed if you want to execute MATLAB code. You can open Jupyter notebooks containing MATLAB code without having MATLAB installed.\n\n* System dependencies required to run MATLAB:\n  - The [MATLAB Dependencies](https://github.com/mathworks-ref-arch/container-images/tree/main/matlab-deps) repository contains `base-dependencies.txt` files that list the libraries required to run each release of MATLAB on a given operating system. To see how to use these files, refer to the Dockerfiles in the same folder.\n\n* Linux based systems also require `X Virtual Frame Buffer (Xvfb)`, which you can install with:\n\n  ```bash\n  # On a Debian/Ubuntu based system:\n  $ sudo apt install xvfb\n\n  # On a RHEL based system:\n  $ yum search Xvfb\n  xorg-x11-server-Xvfb.x86_64 : A X Windows System virtual framebuffer X server.\n  $ sudo yum install xorg-x11-server-Xvfb\n  ```\n\n## Install\n\nInstall this Python package from the Python Package Index (PyPI) or build it from the source.\n\n### Install from PyPI\n\n```bash\npython -m pip install jupyter-matlab-proxy\ninstall-matlab-kernelspec\n```\nFor more information on `install-matlab-kernelspec`, see [Jupyter Kernelspec Installation Utility](https://github.com/mathworks/jupyter-matlab-proxy/blob/main/troubleshooting/troubleshooting.md#jupyter-kernelspec-installation-utility).\n\nInstalling this package will not install MATLAB. To execute MATLAB code in Jupyter, you must have [MATLAB installed](https://www.mathworks.com/help/install/install-products.html) separately.\n\n### Build from Source\n\nAlternatively, you can install this package by building it from the source. This requires Node.js® version 18 or higher. To install Node.js, see [Node.js Downloads](https://nodejs.org/en/download/).\n```bash\ngit clone https://github.com/mathworks/jupyter-matlab-proxy.git\ncd jupyter-matlab-proxy\npython -m pip install .\ninstall-matlab-kernelspec\n```\n\n### Using VS Code\n\nYou can use this package to run MATLAB in Jupyter notebooks using VS Code. For instructions, see [Run MATLAB in Jupyter Notebooks Using VS Code](https://github.com/mathworks/jupyter-matlab-proxy/blob/main/install_guides/vscode/README.md).\n\n### Using JupyterHub and The Littlest JupyterHub\n\nTo use MATLAB with JupyterHub, install the `jupyter-matlab-proxy` Python package in the Jupyter environment launched by your JupyterHub platform. For example, if your JupyterHub platform launches Docker containers, install this package in the Docker image used to launch those containers, using the instructions for [Using MATLAB Integration _for Jupyter_ in a Docker Container](https://github.com/mathworks-ref-arch/matlab-integration-for-jupyter).\n\nTo use MATLAB with [The Littlest JupyterHub (TLJH)](https://tljh.jupyter.org/en/stable/index.html#), see [MATLAB Integration for Jupyter on The Littlest JupyterHub](https://github.com/mathworks/jupyter-matlab-proxy/blob/main/install_guides/the-littlest-jupyterhub/README.md). You might use this if you want to set up JupyterHub on a single server for a small number of users, such as students in a class.\n\n### Using Simulink\n\nThis package lets you use Simulink® programmatically by entering commands in a Jupyter notebook. To view a model or use other Simulink features that require the Simulink UI, you can use a VNC to connect your Jupyter environment to a Linux desktop where you have MATLAB and Simulink installed. For instructions, see [MATLAB Jupyter VNC Solution](https://github.com/mathworks/jupyter-matlab-vnc-proxy).\n\n### Troubleshooting\n\nTo troubleshoot package installation issues, see [Troubleshooting](https://github.com/mathworks/jupyter-matlab-proxy/blob/main/troubleshooting/troubleshooting.md).\n\n\n## Get Started\n\nThis section shows you how to:\n\n1. [Run MATLAB Code in a Jupyter Notebook](#run-matlab-code-in-a-jupyter-notebook)\n2. [Open MATLAB in a Browser](#open-matlab-in-a-browser)\n3. [Edit MATLAB files in JupyterLab](#edit-matlab-files-in-jupyterlab)\n\nInstall Jupyter Notebook or JupyterLab:\n\n  ```bash\n  # For Jupyter Notebook\n  python -m pip install notebook\n\n  # For JupyterLab 4\n  python -m pip install jupyterlab\n  ```\n\nNote: you can use this package to execute MATLAB code in both JupyterLab 3 and 4, but syntax highlighting is only supported on JupyterLab 4.\n\n\nOpen your Jupyter environment by starting Jupyter Notebook or JupyterLab.\n\n  ```bash\n  # For Jupyter Notebook\n  jupyter notebook\n\n  # For JupyterLab\n  jupyter lab\n  ```\n\nIf you are prompted for a token, click the link shown in your terminal to access your Jupyter environment.\n\nAfter installing this package, you see new MATLAB options in your Jupyter environments.\n\n\n| Classic Notebook Interface | JupyterLab |\n| :---: | :---: |\n|\u003cimg width=\"200\" src=\"https://github.com/mathworks/jupyter-matlab-proxy/raw/main/img/classic-jupyter_icons.png\"\u003e|\u003cimg width=\"300\" src=\"https://github.com/mathworks/jupyter-matlab-proxy/raw/main/img/jupyterlab_icons_1.png\"\u003e|\n\n\n## Run MATLAB Code in a Jupyter Notebook\n\nTo open a Jupyter notebook where you can run MATLAB code, click `MATLAB Kernel` in your notebook or JupyterLab.\n\n\n| Classic Notebook Interface | JupyterLab |\n| :---: | :---: |\n|\u003cimg width=\"200\" src=\"https://github.com/mathworks/jupyter-matlab-proxy/raw/main/img/classic-jupyter-kernel.png\"\u003e | \u003cimg width=\"300\" src=\"https://github.com/mathworks/jupyter-matlab-proxy/raw/main/img/jupyterlab_kernel_icon.png\"\u003e|\n\nThis opens a Jupyter notebook that supports MATLAB.\n\n\u003cp align=\"center\"\u003e\u003cimg width=\"600\" src=\"https://github.com/mathworks/jupyter-matlab-proxy/raw/main/img/jupyterlab-notebook.png\"\u003e\u003c/p\u003e\n\n\n### Notes\n\n- **Licensing:** When you execute MATLAB code in a notebook for the first time, enter your MATLAB license information in the dialog box that appears. For details, see [Licensing](https://github.com/mathworks/matlab-proxy/blob/main/MATLAB-Licensing-Info.md). The MATLAB session can take a few minutes to start.\n\n- **MATLAB Kernel:** The MATLAB kernel supports tab completion and rich outputs:\n  * Inline static plot images\n  * LaTeX representation for symbolic expressions\n  * Tables formatted using HTML instead of ASCII, in MATLAB R2024a and later:\n    | Before R2024a | After R2024a |\n    |--|--|\n    |\u003cp align=\"center\"\u003e\u003cimg width=\"450\" src=\"https://github.com/mathworks/jupyter-matlab-proxy/raw/main/img/tables_before_r2024a.png\"\u003e\u003c/p\u003e | \u003cp align=\"center\"\u003e\u003cimg width=\"400\" src=\"https://github.com/mathworks/jupyter-matlab-proxy/raw/main/img/tables_after_r2024a.png\"\u003e\u003c/p\u003e |\n\n  For a technical overview of the MATLAB kernel, see [MATLAB Kernel for Jupyter](https://github.com/mathworks/jupyter-matlab-proxy/blob/main/src/jupyter_matlab_kernel/README.md).\n\n- **Multiple notebooks:** Multiple notebooks running on a Jupyter server share the underlying MATLAB process, so executing code in one notebook affects the workspace in others. If you work in several notebooks simultaneously, be aware they share a workspace. For details, see [MATLAB Kernel for Jupyter](https://github.com/mathworks/jupyter-matlab-proxy/blob/main/src/jupyter_matlab_kernel/README.md).\n- **Local functions:** With MATLAB R2022b and later, you can define a local function at the end of the cell where you want to call it:\n    \u003cp\u003e\u003cimg width=\"350\" src=\"https://github.com/mathworks/jupyter-matlab-proxy/raw/main/img/local_functions.png\"\u003e\u003c/p\u003e\n\n- **Magic Commands:** You can use predefined magic commands in a Jupyter notebook with the MATLAB kernel, and you can also implement your own. To see a list of predefined magic commands, run `%%lsmagic`. For details about using magic commands, see [Magic Commands for MATLAB Kernel](https://github.com/mathworks/jupyter-matlab-proxy/blob/main/src/jupyter_matlab_kernel/magics/README.md).\n\n\n## Open MATLAB in a Browser\n\nTo access more MATLAB features, you can open the MATLAB development environment in your browser. Click the `Open MATLAB` button in your notebook or JupyterLab.\n\n\n| Classic Notebook Interface | JupyterLab |\n| :---: | :---: |\n|\u003cimg width=\"200\" src=\"https://github.com/mathworks/jupyter-matlab-proxy/raw/main/img/open_matlab_notebook.png\"\u003e | \u003cimg width=\"300\" src=\"https://github.com/mathworks/jupyter-matlab-proxy/raw/main/img/open_matlab_jupyterlab.png\"\u003e |\n\nNotebooks in JupyterLab also have a `Open MATLAB` button on the toolbar:\n\n\u003cimg width=\"300\" src=\"https://github.com/mathworks/jupyter-matlab-proxy/raw/main/img/open-matlab-button.png\"\u003e\n\nClicking `Open MATLAB` opens the MATLAB development environment in a new browser tab.\n\n\u003cp align=\"center\"\u003e\u003cimg width=\"600\" src=\"https://github.com/mathworks/jupyter-matlab-proxy/raw/main/img/jupyter_matlab_desktop.png\"\u003e\u003c/p\u003e\n\nWhen you use the package for the first time, enter your MATLAB license information in the dialog box that appears. See [Licensing](https://github.com/mathworks/matlab-proxy/blob/main/MATLAB-Licensing-Info.md) for details.\n\nFor technical details about this MATLAB development environment, see [MATLAB in a Browser](https://github.com/mathworks/jupyter-matlab-proxy/blob/main/src/jupyter_matlab_proxy/README.md).\n\n\n## Edit MATLAB Files in JupyterLab\n\nYou can also edit MATLAB `.m` files in JupyterLab. Click the `MATLAB File` button.\n\n\u003cp align=\"center\"\u003e\u003cimg width=\"300\" src=\"https://github.com/mathworks/jupyter-matlab-proxy/raw/main/img/matlabfile-icon.png\"\u003e\u003c/p\u003e\n\nThis opens an untitled `.m` file where you can write MATLAB code with syntax highlighting.\n\n\u003cp align=\"center\"\u003e\u003cimg width=\"600\" src=\"https://github.com/mathworks/jupyter-matlab-proxy/raw/main/img/new-matlab-file.png\"\u003e\u003c/p\u003e\n\n* Currently, this package allows you to edit MATLAB `.m` files but not to execute them.\n* To open a new MATLAB `.m` file, you can also use the JupyterLab command palette. Press `CTRL+SHIFT+C`, then type `New MATLAB File` and press `Enter`.\n\n## Limitations\n\n* This package has limitations. For example, it does not support certain MATLAB commands. For details, see [Limitations](https://github.com/mathworks/jupyter-matlab-proxy/blob/main/Limitations.md).\n\n* To discuss a technical issue or submit an enhancement request, [create a GitHub issue](https://github.com/mathworks/jupyter-matlab-proxy/issues), or send an email to `jupyter-support@mathworks.com`.\n\n\n----\n\nCopyright 2021-2025 The MathWorks, Inc.\n\n----\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks%2Fjupyter-matlab-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathworks%2Fjupyter-matlab-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks%2Fjupyter-matlab-proxy/lists"}