Setup#
I have used Jupyter notebooks for EG-150 Signals and Systems for a number of reasons:
I can easily produce maths-rich textbook quality notes using the Markdown system provided for documentation blocks.
I can generate a slide-show from my notes but also print them as PDF files for your convenience.
I can interweave live coding examples with my notes and execute and change these examples in a live classroom.
… more interestingly, you can take the notebooks and experiment with the computing examples yourself!
However, to fully access all the examples that have been provided as Jupyter notebooks for EG-150 you will need to install both MATLAB (I used MATLAB 2022b) and Python 3 (I used Anaconda 3) and this is something of a technical challenge.
The installation of Anaconda 3 (which includes Jupyter Notebook) and MATLAB is described elsewhere but must be done before you can open and execute this notebook.
Assuming that you have installed Anaconda 3, you can download and open this notebook using the command:
jupyter notebook setup.ibynb
Alternatively, you can use the Anaconda Navigator to launch a Jupyter Notebook and then navigate to the setup.ipynb
file.
Note for Windows users, you need to start jupyter as an Administrator.
Advanced users#
You may prefer to use the python environments and the command line, in which case, refer to Advanced Settings.
About this notebook#
A Jupyter notebook is a combination of documentation and code cells. It is both a sequence of commands (in this case written in Python) that can be executed in sequence and a record of that execution. This notebook documents the process of installing the MATLAB kernel for Jupyter.
You should be able to run each code cell in turn without errors. To execute code in a Jupyter notebook, select a code cell and press the run button or type Shift-Enter
. The next cell will automatically be selected.
Alternatively you can simply run the whole notebook by selecting the Cell->Run All
command from the menu.
Set up anaconda environment#
Test Base Setup#
The following Python code (adapted from the script soton-test-python-installation.py [1]) can be executed to report whether particular python packages are available on the system.
First we define some tests.
import math
import os
import sys
def test_is_python_35():
major = sys.version_info.major
minor = sys.version_info.minor
if major == 3:
pass
else:
print("You are running Python {}, but we need Python {}.".format(major, 3))
print("Download and install the Anaconda distribution for Python 3.")
print("Stopping here.")
# Let's stop here
sys.exit(1)
return None
# assert major == 3, "Stopping here - we need Python 3."
if minor >= 5:
print("Testing Python version-> py{}.{} OK".format(major, minor))
else:
print("Warning: You should be running Python 3.5 or newer, " +
"you have Python {}.{}.".format(major, minor))
def test_numpy():
try:
import numpy as np
except ImportError:
print("Could not import numpy -> numpy failed")
return None
# Simple test
a = np.arange(0, 100, 1)
assert np.sum(a) == sum(a)
print("Testing numpy... -> numpy OK")
def test_scipy():
try:
import scipy
except ImportError:
print("Could not import 'scipy' -> scipy failed")
return None
# Simple test
import scipy.integrate
assert abs(scipy.integrate.quad(lambda x: x * x, 0, 6)[0] - 72.0) < 1e-6
print("Testing scipy ... -> scipy OK")
def test_pylab():
"""Actually testing matplotlib, as pylab is part of matplotlib."""
try:
import pylab
except ImportError:
print("Could not import 'matplotlib/pylab' -> failed")
return None
# Creata plot for testing purposes
xvalues = [i * 0.1 for i in range(100)]
yvalues = [math.sin(x) for x in xvalues]
pylab.plot(xvalues, yvalues, "-o", label="sin(x)")
pylab.legend()
pylab.xlabel('x')
testfilename='pylab-testfigure.png'
# check that file does not exist yet:
if os.path.exists(testfilename):
print("Skipping plotting to file as file {} exists already."\
.format(testfilename))
else:
# Write plot to file
pylab.savefig(testfilename)
# Then check that file exists
assert os.path.exists(testfilename)
print("Testing matplotlib... -> pylab OK")
os.remove(testfilename)
def test_sympy():
try:
import sympy
except ImportError:
print("Could not import 'sympy' -> fail")
return None
# simple test
x = sympy.Symbol('x')
my_f = x ** 2
assert sympy.diff(my_f,x) == 2 * x
print("Testing sympy -> sympy OK")
def test_pytest():
try:
import pytest
except ImportError:
print("Could not import 'pytest' -> fail")
return None
print("Testing pytest -> pytest OK")
The we run the tests to test that we have all the packages we need. If we have installed Anaconda 3 correctly, there should be no errors.
print("Running using Python {}".format(sys.version))
test_is_python_35()
test_numpy()
test_scipy()
test_pylab()
test_sympy()
test_pytest()
Running using Python 3.12.8 (main, Jan 14 2025, 23:36:58) [Clang 19.1.6 ]
Testing Python version-> py3.12 OK
Testing numpy... -> numpy OK
Testing scipy ... -> scipy OK
Testing matplotlib... -> pylab OK
Testing sympy -> sympy OK
Testing pytest -> pytest OK

The remaining installation instructions are adapted from [2].
Python-MATLAB Bridge#
To install this, we first have to install MATLAB. I’m assuming that this has been done and you have MATLAB 2017b or greater installed.
Now we install the Python-MATLAB bridge.
Here we’ve adapted the instructions given in the official MATLAB documentation MATLAB API for Python.
I ran this on my Mac. The equivalent Windows and Linux commands are given in the comments.
Mac OS:#
matlabroot='/Applications/MATLAB_R2023b.app'
Unix#
%cd {matlabroot}/extern/engines/python
[Errno 2] No such file or directory: '/Applications/MATLAB_R2023b.app/extern/engines/python'
/Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/setup
Ubuntu running in Windows using WSL#
matlabroot='/mnt/c/Program\ Files/MATLAB/R2023a'
%cd {matlabroot}/extern/engines/python
[Errno 2] No such file or directory: '/mnt/c/Program Files/MATLAB/R2023a/extern/engines/python'
/Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/setup
<>:1: SyntaxWarning: invalid escape sequence '\ '
<>:1: SyntaxWarning: invalid escape sequence '\ '
/var/folders/nr/qcbm4tg56d7_34s40jk00rg80000gn/T/ipykernel_44688/2768956452.py:1: SyntaxWarning: invalid escape sequence '\ '
matlabroot='/mnt/c/Program\ Files/MATLAB/R2023a'
Windows#
matlabroot='C:\Program Files\MATLAB\R202a'
%cd {matlabroot}\extern\engines\python
[Errno 2] No such file or directory: 'C:Program FilesMATLABR202aexternenginespython'
/Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/setup
<>:1: SyntaxWarning: invalid escape sequence '\P'
<>:1: SyntaxWarning: invalid escape sequence '\P'
/var/folders/nr/qcbm4tg56d7_34s40jk00rg80000gn/T/ipykernel_44688/946551368.py:1: SyntaxWarning: invalid escape sequence '\P'
matlabroot='C:\Program Files\MATLAB\R202a'
Install MATLAB Engine#
Notes
On windows you have to do this step as an admin user
Open the anaconda prompt as administrator.
Copy result of previous command
type
cd
then paste what you’ve just copied and typeEnter
Now copy
python setup.py install
, paste and typeEnter
If your MATLAB is 2016b, or older, you may need to install an earlier version of Python and repeat the steps above.
!python --version
#%shell
!python -m pip install .
Python 3.12.8
ERROR: Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.
Test Python can now communicate with MATLAB#
First start a MATLAB session. You will have to restart your Python kernel first!
import matlab.engine
eng = matlab.engine.start_matlab()
Then connect to the session
eng = matlab.engine.connect_matlab()
Now compute something. Here’s a 10x10 magic square
m = eng.magic(10);
print(m)
[[92.0,99.0,1.0,8.0,15.0,67.0,74.0,51.0,58.0,40.0],[98.0,80.0,7.0,14.0,16.0,73.0,55.0,57.0,64.0,41.0],[4.0,81.0,88.0,20.0,22.0,54.0,56.0,63.0,70.0,47.0],[85.0,87.0,19.0,21.0,3.0,60.0,62.0,69.0,71.0,28.0],[86.0,93.0,25.0,2.0,9.0,61.0,68.0,75.0,52.0,34.0],[17.0,24.0,76.0,83.0,90.0,42.0,49.0,26.0,33.0,65.0],[23.0,5.0,82.0,89.0,91.0,48.0,30.0,32.0,39.0,66.0],[79.0,6.0,13.0,95.0,97.0,29.0,31.0,38.0,45.0,72.0],[10.0,12.0,94.0,96.0,78.0,35.0,37.0,44.0,46.0,53.0],[11.0,18.0,100.0,77.0,84.0,36.0,43.0,50.0,27.0,59.0]]
Close the session
eng.quit()
MATLAB Kernel for Jupyter#
Finally we install the matlab_kernel
using the instructions given here: gthub.com/mathworks/jupyter-matlab-proxy.
!python3 -m pip install jupyter-matlab-proxy
DEPRECATION: Loading egg at /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages/matlabengine-24.2-py3.12.egg is deprecated. pip 25.1 will enforce this behaviour change. A possible replacement is to use pip for package installation. Discussion can be found at https://github.com/pypa/pip/issues/12330
Requirement already satisfied: jupyter-matlab-proxy in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (0.16.3)
Requirement already satisfied: aiohttp in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-matlab-proxy) (3.10.5)
Requirement already satisfied: ipykernel in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-matlab-proxy) (6.29.5)
Requirement already satisfied: jupyter-client in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-matlab-proxy) (8.6.3)
Requirement already satisfied: jupyter-server-proxy>=4.1.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-matlab-proxy) (4.4.0)
Requirement already satisfied: matlab-proxy>=0.23.3 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-matlab-proxy) (0.24.1)
Requirement already satisfied: psutil in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-matlab-proxy) (7.0.0)
Requirement already satisfied: requests in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-matlab-proxy) (2.32.3)
Requirement already satisfied: jupyter-server>=1.24.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (2.15.0)
Requirement already satisfied: simpervisor>=1.0.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (1.0.0)
Requirement already satisfied: tornado>=6.1.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (6.4.2)
Requirement already satisfied: traitlets>=5.1.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (5.14.3)
Requirement already satisfied: aiohttp-session[secure] in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from matlab-proxy>=0.23.3->jupyter-matlab-proxy) (2.12.1)
Requirement already satisfied: importlib-metadata in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from matlab-proxy>=0.23.3->jupyter-matlab-proxy) (8.6.1)
Requirement already satisfied: importlib-resources in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from matlab-proxy>=0.23.3->jupyter-matlab-proxy) (6.5.2)
Requirement already satisfied: watchdog in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from matlab-proxy>=0.23.3->jupyter-matlab-proxy) (6.0.0)
Requirement already satisfied: aiohappyeyeballs>=2.3.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from aiohttp->jupyter-matlab-proxy) (2.4.8)
Requirement already satisfied: aiosignal>=1.1.2 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from aiohttp->jupyter-matlab-proxy) (1.3.2)
Requirement already satisfied: attrs>=17.3.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from aiohttp->jupyter-matlab-proxy) (25.1.0)
Requirement already satisfied: frozenlist>=1.1.1 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from aiohttp->jupyter-matlab-proxy) (1.5.0)
Requirement already satisfied: multidict<7.0,>=4.5 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from aiohttp->jupyter-matlab-proxy) (6.1.0)
Requirement already satisfied: yarl<2.0,>=1.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from aiohttp->jupyter-matlab-proxy) (1.18.3)
Requirement already satisfied: appnope in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipykernel->jupyter-matlab-proxy) (0.1.4)
Requirement already satisfied: comm>=0.1.1 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipykernel->jupyter-matlab-proxy) (0.2.2)
Requirement already satisfied: debugpy>=1.6.5 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipykernel->jupyter-matlab-proxy) (1.8.12)
Requirement already satisfied: ipython>=7.23.1 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipykernel->jupyter-matlab-proxy) (9.0.1)
Requirement already satisfied: jupyter-core!=5.0.*,>=4.12 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipykernel->jupyter-matlab-proxy) (5.7.2)
Requirement already satisfied: matplotlib-inline>=0.1 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipykernel->jupyter-matlab-proxy) (0.1.7)
Requirement already satisfied: nest-asyncio in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipykernel->jupyter-matlab-proxy) (1.6.0)
Requirement already satisfied: packaging in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipykernel->jupyter-matlab-proxy) (24.2)
Requirement already satisfied: pyzmq>=24 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipykernel->jupyter-matlab-proxy) (26.2.1)
Requirement already satisfied: python-dateutil>=2.8.2 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-client->jupyter-matlab-proxy) (2.9.0.post0)
Requirement already satisfied: charset-normalizer<4,>=2 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from requests->jupyter-matlab-proxy) (3.4.1)
Requirement already satisfied: idna<4,>=2.5 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from requests->jupyter-matlab-proxy) (3.10)
Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from requests->jupyter-matlab-proxy) (2.3.0)
Requirement already satisfied: certifi>=2017.4.17 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from requests->jupyter-matlab-proxy) (2025.1.31)
Requirement already satisfied: decorator in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipython>=7.23.1->ipykernel->jupyter-matlab-proxy) (5.2.1)
Requirement already satisfied: ipython-pygments-lexers in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipython>=7.23.1->ipykernel->jupyter-matlab-proxy) (1.1.1)
Requirement already satisfied: jedi>=0.16 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipython>=7.23.1->ipykernel->jupyter-matlab-proxy) (0.19.2)
Requirement already satisfied: pexpect>4.3 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipython>=7.23.1->ipykernel->jupyter-matlab-proxy) (4.9.0)
Requirement already satisfied: prompt_toolkit<3.1.0,>=3.0.41 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipython>=7.23.1->ipykernel->jupyter-matlab-proxy) (3.0.50)
Requirement already satisfied: pygments>=2.4.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipython>=7.23.1->ipykernel->jupyter-matlab-proxy) (2.19.1)
Requirement already satisfied: stack_data in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipython>=7.23.1->ipykernel->jupyter-matlab-proxy) (0.6.3)
Requirement already satisfied: platformdirs>=2.5 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-core!=5.0.*,>=4.12->ipykernel->jupyter-matlab-proxy) (4.2.2)
Requirement already satisfied: anyio>=3.1.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (4.8.0)
Requirement already satisfied: argon2-cffi>=21.1 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (23.1.0)
Requirement already satisfied: jinja2>=3.0.3 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (3.1.5)
Requirement already satisfied: jupyter-events>=0.11.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (0.12.0)
Requirement already satisfied: jupyter-server-terminals>=0.4.4 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (0.5.3)
Requirement already satisfied: nbconvert>=6.4.4 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (7.16.6)
Requirement already satisfied: nbformat>=5.3.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (5.10.4)
Requirement already satisfied: overrides>=5.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (7.7.0)
Requirement already satisfied: prometheus-client>=0.9 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (0.21.1)
Requirement already satisfied: send2trash>=1.8.2 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (1.8.3)
Requirement already satisfied: terminado>=0.8.3 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (0.18.1)
Requirement already satisfied: websocket-client>=1.7 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (1.8.0)
Requirement already satisfied: six>=1.5 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from python-dateutil>=2.8.2->jupyter-client->jupyter-matlab-proxy) (1.17.0)
Requirement already satisfied: propcache>=0.2.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from yarl<2.0,>=1.0->aiohttp->jupyter-matlab-proxy) (0.3.0)
Requirement already satisfied: cryptography in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from aiohttp-session[secure]->matlab-proxy>=0.23.3->jupyter-matlab-proxy) (44.0.2)
Requirement already satisfied: zipp>=3.20 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from importlib-metadata->matlab-proxy>=0.23.3->jupyter-matlab-proxy) (3.21.0)
Requirement already satisfied: sniffio>=1.1 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from anyio>=3.1.0->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (1.3.1)
Requirement already satisfied: typing_extensions>=4.5 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from anyio>=3.1.0->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (4.12.2)
Requirement already satisfied: argon2-cffi-bindings in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from argon2-cffi>=21.1->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (21.2.0)
Requirement already satisfied: parso<0.9.0,>=0.8.4 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jedi>=0.16->ipython>=7.23.1->ipykernel->jupyter-matlab-proxy) (0.8.4)
Requirement already satisfied: MarkupSafe>=2.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jinja2>=3.0.3->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (3.0.2)
Requirement already satisfied: jsonschema>=4.18.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (4.23.0)
Requirement already satisfied: python-json-logger>=2.0.4 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-events>=0.11.0->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (3.2.1)
Requirement already satisfied: pyyaml>=5.3 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-events>=0.11.0->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (6.0.2)
Requirement already satisfied: referencing in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-events>=0.11.0->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (0.36.2)
Requirement already satisfied: rfc3339-validator in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-events>=0.11.0->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (0.1.4)
Requirement already satisfied: rfc3986-validator>=0.1.1 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-events>=0.11.0->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (0.1.1)
Requirement already satisfied: beautifulsoup4 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from nbconvert>=6.4.4->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (4.13.3)
Requirement already satisfied: bleach!=5.0.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from bleach[css]!=5.0.0->nbconvert>=6.4.4->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (6.2.0)
Requirement already satisfied: defusedxml in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from nbconvert>=6.4.4->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (0.7.1)
Requirement already satisfied: jupyterlab-pygments in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from nbconvert>=6.4.4->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (0.3.0)
Requirement already satisfied: mistune<4,>=2.0.3 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from nbconvert>=6.4.4->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (3.1.2)
Requirement already satisfied: nbclient>=0.5.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from nbconvert>=6.4.4->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (0.10.2)
Requirement already satisfied: pandocfilters>=1.4.1 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from nbconvert>=6.4.4->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (1.5.1)
Requirement already satisfied: fastjsonschema>=2.15 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from nbformat>=5.3.0->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (2.21.1)
Requirement already satisfied: ptyprocess>=0.5 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from pexpect>4.3->ipython>=7.23.1->ipykernel->jupyter-matlab-proxy) (0.7.0)
Requirement already satisfied: wcwidth in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from prompt_toolkit<3.1.0,>=3.0.41->ipython>=7.23.1->ipykernel->jupyter-matlab-proxy) (0.2.13)
Requirement already satisfied: cffi>=1.12 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from cryptography->aiohttp-session[secure]->matlab-proxy>=0.23.3->jupyter-matlab-proxy) (1.17.1)
Requirement already satisfied: executing>=1.2.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from stack_data->ipython>=7.23.1->ipykernel->jupyter-matlab-proxy) (2.2.0)
Requirement already satisfied: asttokens>=2.1.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from stack_data->ipython>=7.23.1->ipykernel->jupyter-matlab-proxy) (3.0.0)
Requirement already satisfied: pure-eval in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from stack_data->ipython>=7.23.1->ipykernel->jupyter-matlab-proxy) (0.2.3)
Requirement already satisfied: webencodings in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from bleach!=5.0.0->bleach[css]!=5.0.0->nbconvert>=6.4.4->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (0.5.1)
Requirement already satisfied: tinycss2<1.5,>=1.1.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from bleach[css]!=5.0.0->nbconvert>=6.4.4->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (1.4.0)
Requirement already satisfied: pycparser in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from cffi>=1.12->cryptography->aiohttp-session[secure]->matlab-proxy>=0.23.3->jupyter-matlab-proxy) (2.22)
Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jsonschema>=4.18.0->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (2024.10.1)
Requirement already satisfied: rpds-py>=0.7.1 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jsonschema>=4.18.0->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (0.23.1)
Requirement already satisfied: fqdn in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (1.5.1)
Requirement already satisfied: isoduration in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (20.11.0)
Requirement already satisfied: jsonpointer>1.13 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (3.0.0)
Requirement already satisfied: uri-template in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (1.3.0)
Requirement already satisfied: webcolors>=24.6.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (24.11.1)
Requirement already satisfied: soupsieve>1.2 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from beautifulsoup4->nbconvert>=6.4.4->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (2.6)
Requirement already satisfied: arrow>=0.15.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from isoduration->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (1.3.0)
Requirement already satisfied: types-python-dateutil>=2.8.10 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from arrow>=0.15.0->isoduration->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server>=1.24.0->jupyter-server-proxy>=4.1.0->jupyter-matlab-proxy) (2.9.0.20241206)
!python3 -m pip install 'jupyterlab>=3.0.0,<4.0.0a0'
DEPRECATION: Loading egg at /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages/matlabengine-24.2-py3.12.egg is deprecated. pip 25.1 will enforce this behaviour change. A possible replacement is to use pip for package installation. Discussion can be found at https://github.com/pypa/pip/issues/12330
Collecting jupyterlab<4.0.0a0,>=3.0.0
Downloading jupyterlab-3.6.8-py3-none-any.whl.metadata (12 kB)
Requirement already satisfied: ipython in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyterlab<4.0.0a0,>=3.0.0) (9.0.1)
Requirement already satisfied: packaging in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyterlab<4.0.0a0,>=3.0.0) (24.2)
Requirement already satisfied: tornado>=6.1.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyterlab<4.0.0a0,>=3.0.0) (6.4.2)
Requirement already satisfied: jupyter-core in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyterlab<4.0.0a0,>=3.0.0) (5.7.2)
Requirement already satisfied: jupyterlab-server~=2.19 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyterlab<4.0.0a0,>=3.0.0) (2.27.3)
Requirement already satisfied: jupyter-server<3,>=1.16.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyterlab<4.0.0a0,>=3.0.0) (2.15.0)
Collecting jupyter-ydoc~=0.2.4 (from jupyterlab<4.0.0a0,>=3.0.0)
Downloading jupyter_ydoc-0.2.5-py3-none-any.whl.metadata (2.2 kB)
Collecting jupyter-server-ydoc~=0.8.0 (from jupyterlab<4.0.0a0,>=3.0.0)
Downloading jupyter_server_ydoc-0.8.0-py3-none-any.whl.metadata (5.3 kB)
Requirement already satisfied: nbclassic in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyterlab<4.0.0a0,>=3.0.0) (1.2.0)
Collecting notebook<7 (from jupyterlab<4.0.0a0,>=3.0.0)
Downloading notebook-6.5.7-py3-none-any.whl.metadata (2.5 kB)
Requirement already satisfied: jinja2>=2.1 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyterlab<4.0.0a0,>=3.0.0) (3.1.5)
Requirement already satisfied: MarkupSafe>=2.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jinja2>=2.1->jupyterlab<4.0.0a0,>=3.0.0) (3.0.2)
Requirement already satisfied: anyio>=3.1.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (4.8.0)
Requirement already satisfied: argon2-cffi>=21.1 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (23.1.0)
Requirement already satisfied: jupyter-client>=7.4.4 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (8.6.3)
Requirement already satisfied: jupyter-events>=0.11.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (0.12.0)
Requirement already satisfied: jupyter-server-terminals>=0.4.4 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (0.5.3)
Requirement already satisfied: nbconvert>=6.4.4 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (7.16.6)
Requirement already satisfied: nbformat>=5.3.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (5.10.4)
Requirement already satisfied: overrides>=5.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (7.7.0)
Requirement already satisfied: prometheus-client>=0.9 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (0.21.1)
Requirement already satisfied: pyzmq>=24 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (26.2.1)
Requirement already satisfied: send2trash>=1.8.2 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (1.8.3)
Requirement already satisfied: terminado>=0.8.3 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (0.18.1)
Requirement already satisfied: traitlets>=5.6.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (5.14.3)
Requirement already satisfied: websocket-client>=1.7 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (1.8.0)
Requirement already satisfied: platformdirs>=2.5 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-core->jupyterlab<4.0.0a0,>=3.0.0) (4.2.2)
Collecting jupyter-server-fileid<1,>=0.6.0 (from jupyter-server-ydoc~=0.8.0->jupyterlab<4.0.0a0,>=3.0.0)
Downloading jupyter_server_fileid-0.9.3-py3-none-any.whl.metadata (4.7 kB)
Collecting ypy-websocket<0.9.0,>=0.8.2 (from jupyter-server-ydoc~=0.8.0->jupyterlab<4.0.0a0,>=3.0.0)
Downloading ypy_websocket-0.8.4-py3-none-any.whl.metadata (2.5 kB)
Collecting y-py<0.7.0,>=0.6.0 (from jupyter-ydoc~=0.2.4->jupyterlab<4.0.0a0,>=3.0.0)
Downloading y_py-0.6.2-cp312-cp312-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.metadata (5.6 kB)
Requirement already satisfied: babel>=2.10 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyterlab-server~=2.19->jupyterlab<4.0.0a0,>=3.0.0) (2.17.0)
Requirement already satisfied: json5>=0.9.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyterlab-server~=2.19->jupyterlab<4.0.0a0,>=3.0.0) (0.10.0)
Requirement already satisfied: jsonschema>=4.18.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyterlab-server~=2.19->jupyterlab<4.0.0a0,>=3.0.0) (4.23.0)
Requirement already satisfied: requests>=2.31 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyterlab-server~=2.19->jupyterlab<4.0.0a0,>=3.0.0) (2.32.3)
Collecting jupyter-client>=7.4.4 (from jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0)
Downloading jupyter_client-7.4.9-py3-none-any.whl.metadata (8.5 kB)
Requirement already satisfied: ipython-genutils in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from notebook<7->jupyterlab<4.0.0a0,>=3.0.0) (0.2.0)
Requirement already satisfied: nest-asyncio>=1.5 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from notebook<7->jupyterlab<4.0.0a0,>=3.0.0) (1.6.0)
Requirement already satisfied: ipykernel in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from notebook<7->jupyterlab<4.0.0a0,>=3.0.0) (6.29.5)
Requirement already satisfied: notebook-shim>=0.2.3 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from nbclassic->jupyterlab<4.0.0a0,>=3.0.0) (0.2.4)
Requirement already satisfied: decorator in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipython->jupyterlab<4.0.0a0,>=3.0.0) (5.2.1)
Requirement already satisfied: ipython-pygments-lexers in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipython->jupyterlab<4.0.0a0,>=3.0.0) (1.1.1)
Requirement already satisfied: jedi>=0.16 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipython->jupyterlab<4.0.0a0,>=3.0.0) (0.19.2)
Requirement already satisfied: matplotlib-inline in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipython->jupyterlab<4.0.0a0,>=3.0.0) (0.1.7)
Requirement already satisfied: pexpect>4.3 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipython->jupyterlab<4.0.0a0,>=3.0.0) (4.9.0)
Requirement already satisfied: prompt_toolkit<3.1.0,>=3.0.41 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipython->jupyterlab<4.0.0a0,>=3.0.0) (3.0.50)
Requirement already satisfied: pygments>=2.4.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipython->jupyterlab<4.0.0a0,>=3.0.0) (2.19.1)
Requirement already satisfied: stack_data in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipython->jupyterlab<4.0.0a0,>=3.0.0) (0.6.3)
Requirement already satisfied: idna>=2.8 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from anyio>=3.1.0->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (3.10)
Requirement already satisfied: sniffio>=1.1 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from anyio>=3.1.0->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (1.3.1)
Requirement already satisfied: typing_extensions>=4.5 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from anyio>=3.1.0->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (4.12.2)
Requirement already satisfied: argon2-cffi-bindings in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from argon2-cffi>=21.1->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (21.2.0)
Requirement already satisfied: parso<0.9.0,>=0.8.4 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jedi>=0.16->ipython->jupyterlab<4.0.0a0,>=3.0.0) (0.8.4)
Requirement already satisfied: attrs>=22.2.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jsonschema>=4.18.0->jupyterlab-server~=2.19->jupyterlab<4.0.0a0,>=3.0.0) (25.1.0)
Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jsonschema>=4.18.0->jupyterlab-server~=2.19->jupyterlab<4.0.0a0,>=3.0.0) (2024.10.1)
Requirement already satisfied: referencing>=0.28.4 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jsonschema>=4.18.0->jupyterlab-server~=2.19->jupyterlab<4.0.0a0,>=3.0.0) (0.36.2)
Requirement already satisfied: rpds-py>=0.7.1 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jsonschema>=4.18.0->jupyterlab-server~=2.19->jupyterlab<4.0.0a0,>=3.0.0) (0.23.1)
Collecting entrypoints (from jupyter-client>=7.4.4->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0)
Downloading entrypoints-0.4-py3-none-any.whl.metadata (2.6 kB)
Requirement already satisfied: python-dateutil>=2.8.2 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-client>=7.4.4->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (2.9.0.post0)
Requirement already satisfied: python-json-logger>=2.0.4 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-events>=0.11.0->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (3.2.1)
Requirement already satisfied: pyyaml>=5.3 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-events>=0.11.0->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (6.0.2)
Requirement already satisfied: rfc3339-validator in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-events>=0.11.0->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (0.1.4)
Requirement already satisfied: rfc3986-validator>=0.1.1 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jupyter-events>=0.11.0->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (0.1.1)
Requirement already satisfied: beautifulsoup4 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (4.13.3)
Requirement already satisfied: bleach!=5.0.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from bleach[css]!=5.0.0->nbconvert>=6.4.4->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (6.2.0)
Requirement already satisfied: defusedxml in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (0.7.1)
Requirement already satisfied: jupyterlab-pygments in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (0.3.0)
Requirement already satisfied: mistune<4,>=2.0.3 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (3.1.2)
Requirement already satisfied: nbclient>=0.5.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (0.10.2)
Requirement already satisfied: pandocfilters>=1.4.1 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (1.5.1)
Requirement already satisfied: fastjsonschema>=2.15 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from nbformat>=5.3.0->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (2.21.1)
Requirement already satisfied: ptyprocess>=0.5 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from pexpect>4.3->ipython->jupyterlab<4.0.0a0,>=3.0.0) (0.7.0)
Requirement already satisfied: wcwidth in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from prompt_toolkit<3.1.0,>=3.0.41->ipython->jupyterlab<4.0.0a0,>=3.0.0) (0.2.13)
Requirement already satisfied: charset-normalizer<4,>=2 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from requests>=2.31->jupyterlab-server~=2.19->jupyterlab<4.0.0a0,>=3.0.0) (3.4.1)
Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from requests>=2.31->jupyterlab-server~=2.19->jupyterlab<4.0.0a0,>=3.0.0) (2.3.0)
Requirement already satisfied: certifi>=2017.4.17 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from requests>=2.31->jupyterlab-server~=2.19->jupyterlab<4.0.0a0,>=3.0.0) (2025.1.31)
Collecting aiofiles<23,>=22.1.0 (from ypy-websocket<0.9.0,>=0.8.2->jupyter-server-ydoc~=0.8.0->jupyterlab<4.0.0a0,>=3.0.0)
Downloading aiofiles-22.1.0-py3-none-any.whl.metadata (8.0 kB)
Collecting aiosqlite<1,>=0.17.0 (from ypy-websocket<0.9.0,>=0.8.2->jupyter-server-ydoc~=0.8.0->jupyterlab<4.0.0a0,>=3.0.0)
Downloading aiosqlite-0.21.0-py3-none-any.whl.metadata (4.3 kB)
Requirement already satisfied: appnope in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipykernel->notebook<7->jupyterlab<4.0.0a0,>=3.0.0) (0.1.4)
Requirement already satisfied: comm>=0.1.1 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipykernel->notebook<7->jupyterlab<4.0.0a0,>=3.0.0) (0.2.2)
Requirement already satisfied: debugpy>=1.6.5 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipykernel->notebook<7->jupyterlab<4.0.0a0,>=3.0.0) (1.8.12)
Requirement already satisfied: psutil in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from ipykernel->notebook<7->jupyterlab<4.0.0a0,>=3.0.0) (7.0.0)
Requirement already satisfied: executing>=1.2.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from stack_data->ipython->jupyterlab<4.0.0a0,>=3.0.0) (2.2.0)
Requirement already satisfied: asttokens>=2.1.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from stack_data->ipython->jupyterlab<4.0.0a0,>=3.0.0) (3.0.0)
Requirement already satisfied: pure-eval in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from stack_data->ipython->jupyterlab<4.0.0a0,>=3.0.0) (0.2.3)
Requirement already satisfied: webencodings in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from bleach!=5.0.0->bleach[css]!=5.0.0->nbconvert>=6.4.4->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (0.5.1)
Requirement already satisfied: tinycss2<1.5,>=1.1.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from bleach[css]!=5.0.0->nbconvert>=6.4.4->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (1.4.0)
Requirement already satisfied: fqdn in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (1.5.1)
Requirement already satisfied: isoduration in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (20.11.0)
Requirement already satisfied: jsonpointer>1.13 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (3.0.0)
Requirement already satisfied: uri-template in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (1.3.0)
Requirement already satisfied: webcolors>=24.6.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (24.11.1)
Requirement already satisfied: six>=1.5 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from python-dateutil>=2.8.2->jupyter-client>=7.4.4->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (1.17.0)
Requirement already satisfied: cffi>=1.0.1 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from argon2-cffi-bindings->argon2-cffi>=21.1->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (1.17.1)
Requirement already satisfied: soupsieve>1.2 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from beautifulsoup4->nbconvert>=6.4.4->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (2.6)
Requirement already satisfied: pycparser in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi>=21.1->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (2.22)
Requirement already satisfied: arrow>=0.15.0 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from isoduration->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (1.3.0)
Requirement already satisfied: types-python-dateutil>=2.8.10 in /Users/eechris/code/src/github.com/cpjobling/eg-150-textbook/.venv/lib/python3.12/site-packages (from arrow>=0.15.0->isoduration->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=1.16.0->jupyterlab<4.0.0a0,>=3.0.0) (2.9.0.20241206)
Downloading jupyterlab-3.6.8-py3-none-any.whl (8.9 MB)
?25l ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/8.9 MB ? eta -:--:--
━━━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.9/8.9 MB 21.9 MB/s eta 0:00:01
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.9/8.9 MB 29.1 MB/s eta 0:00:00
?25hDownloading jupyter_server_ydoc-0.8.0-py3-none-any.whl (11 kB)
Downloading jupyter_ydoc-0.2.5-py3-none-any.whl (6.2 kB)
Downloading notebook-6.5.7-py3-none-any.whl (529 kB)
?25l ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/529.8 kB ? eta -:--:--
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 529.8/529.8 kB 16.2 MB/s eta 0:00:00
?25h
Downloading jupyter_client-7.4.9-py3-none-any.whl (133 kB)
Downloading jupyter_server_fileid-0.9.3-py3-none-any.whl (16 kB)
Downloading y_py-0.6.2-cp312-cp312-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (1.5 MB)
?25l ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/1.5 MB ? eta -:--:--
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 11.8 MB/s eta 0:00:00
?25hDownloading ypy_websocket-0.8.4-py3-none-any.whl (10 kB)
Downloading aiofiles-22.1.0-py3-none-any.whl (14 kB)
Downloading aiosqlite-0.21.0-py3-none-any.whl (15 kB)
Downloading entrypoints-0.4-py3-none-any.whl (5.3 kB)
Installing collected packages: y-py, jupyter-ydoc, entrypoints, aiosqlite, aiofiles, ypy-websocket, jupyter-client, jupyter-server-fileid, jupyter-server-ydoc, notebook, jupyterlab
Attempting uninstall: jupyter-client
Found existing installation: jupyter_client 8.6.3
Uninstalling jupyter_client-8.6.3:
Successfully uninstalled jupyter_client-8.6.3
Attempting uninstall: notebook
Found existing installation: notebook 7.3.2
Uninstalling notebook-7.3.2:
Successfully uninstalled notebook-7.3.2
Attempting uninstall: jupyterlab
Found existing installation: jupyterlab 4.3.5
Uninstalling jupyterlab-4.3.5:
Successfully uninstalled jupyterlab-4.3.5
Successfully installed aiofiles-22.1.0 aiosqlite-0.21.0 entrypoints-0.4 jupyter-client-7.4.9 jupyter-server-fileid-0.9.3 jupyter-server-ydoc-0.8.0 jupyter-ydoc-0.2.5 jupyterlab-3.6.8 notebook-6.5.7 y-py-0.6.2 ypy-websocket-0.8.4
To check that the MATLAB kernel is properly installed do the following.
Save this notebook
File->Save
.Select
Kernel->Shutdown
from the notebook menu.Close the browser window.
Restart the Jupiter Notebook, as you did at the start, then return here:
jupyter notebook setup.ipynb --debug
Test MATLAB Kernel#
From the Kernel
menu you should be able to navigate to Change kernel
and MATLAB
should now be listed (Fig. 1).
Figure 1: The Kernel Menu
Go ahead and switch to the MATLAB kernel.
If all is well, you should see the Kernel indicator (top right) change to ‘MATLAB’ (Fig. 2)
Figure 2: The MATLAB kernel indicator
You should now be able to execute the MATLAB magic(10)
function again and get the result shown:
magic(10)
ans =
92 99 1 8 15 67 74 51 58 40
98 80 7 14 16 73 55 57 64 41
4 81 88 20 22 54 56 63 70 47
85 87 19 21 3 60 62 69 71 28
86 93 25 2 9 61 68 75 52 34
17 24 76 83 90 42 49 26 33 65
23 5 82 89 91 48 30 32 39 66
79 6 13 95 97 29 31 38 45 72
10 12 94 96 78 35 37 44 46 53
11 18 100 77 84 36 43 50 27 59
Go ahead and execute the next code cell.
magic(10)
If you wish to further test the MATLAB interface, download this file from the Calysto/matlab_kernel
repository matlab_kernel.ipynb, open it in Jupyter and run the whole notebook.
If you have any problems, send me a message through the Teams page for the EG-247 Course.
For More Information on Jupyter#
To learn more about Jupyter notebooks, the key resource is the Jupyter Project site itself. There, under the documentation section, you will find everything you need to fully understand Jupyter. However, it’s not arranged in a way that is useful for a beginner!
For a quick introduction, I particularly recommend Corey Schafer’s YouTube tutorial: https://youtu.be/HW29067qVWk.
%%html
<iframe width="560" height="315" src="https://www.youtube.com/embed/HW29067qVWk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Jupyter Noteboooks versus MATLAB Live Scripts#
Both Jupyter and MATLAB Live Script trace their origins – or at least their inspiration – to the Mathematica Notebook interface. All allow the mixing of code with output, the running of code in sections, and the ability to add formatted text, images, and equations to tell a story and provide a repeatable record of a computation.
The Mathworks claims some advantages for the MATLAB Live Script interface due to its close integration with the MATLAB desktop and the new MATLAB Online product. Other teachers have also advocated the use of Live Script in teaching, e.g. Teaching with MATLAB Live Scripts. The main issue though is that MATLAB is an expensive, licensed product. It’s free to use while you are a student or a teacher at Swansea University. It is extremely expensive once you graduate!
For me, the main advantage of Jupyter notebooks is that it is language independent, well supported, open source and free! It also has some features, mentioned at the top of this document, that make it particularly attractive as a support tool for the teaching on this course.
That said, we will be using MATLAB throughout this course and MATLAB Live Scripts in the Labs for this module.
References#
Fangohr, Prof Hans, Installation of Python, Spyder, Numpy, Sympy, Scipy, Pytest, Matplotlib via Anaconda, University of Southampton, 20116. Available from: https://fangohr.github.io/blog/installation-of-python-spyder-numpy-sympy-scipy-pytest-matplotlib-via-anaconda.html.
Blank, Doug, Silvester, Steven and Lee, Antony,
Calysto/matlab_kernel
README, Calysto, 2017. Available from GitHub: Calysto/matlab_kernel.Lee, Antony and collaborators, A Jupyter kernel for MATLAB, 2021. Available from GitHub: imatlab/imatlab.