Here are the tools I'm using
-
OS: Windows 11
- Terminal launching Miniconda3 (4.12.0)
-
Python: 3.10.4
-
pip: 22.2.2
-
MATLAB: R2022b (9.13.0.2049777 )
- Note: Run the terminal in administrator or elevated permission (depending on your OS)
-
conda create -n "sos" python=3.10
-
conda activate sos
-
pyversion('C:\Users\<user>\miniconda3\envs\matlab\python.exe'); pyenv('ExecutionMode', 'OutOfProcess');
- run in conda terminal:
conda install sos sos-pbs sos-notebook jupyterlab-sos sos-papermill sos-python -c conda-forge
pip install sos-matlab
- Source: https://vatlab.github.io/sos-docs/running.html#Conda-installation
6. Install the MATLAB engine to Python (note that official documentation is deprecated on MathWorks and SoS websites now)
- In conda terminal run:
python -m pip install matlabengine==9.13.7
- To test that this worked, first activate Python in the conda terminal via:
-
python
- Then execute the following code:
import matlab.engine eng = matlab.engine.start_matlab() eng.isprime(37)
- This should return
True
. If there were errors, troubleshoot at https://github.com/mathworks/matlab-engine-for-python
- This should return
- Exit Python with
exit()
but keep terminal open.
-
pip install matlab_kernel
8. Confirm that the installation works by running the example/test_installation notebook and running each cell.
- Open a Jupyter Notebook in conda terminal via:
jupyter notebook
- You will need to change the ratelimit for Jupyter to visualize larger EEGLAB objects. Follow the steps here:
- https://stackoverflow.com/questions/43288550/iopub-data-rate-exceeded-in-jupyter-notebook-when-viewing-image
jupyter notebook --generate-config
- edit this file
- search for
c.NotebookApp.iopub_data_rate_limit
- uncomment this and set the value to:
=1.0e10