Closed HappySpring closed 11 months ago
Thank you for using jupyter-matlab-proxy, @HappySpring!
Can you please confirm that you are able to start this version of MATLAB outside of jupyter-server-proxy? I have observed this sort of error message stemming from MATLAB when there is a mismatched install. Example: An install of Intel-based MATLAB on an ARM-based machine and vice-versa.
With R2023b natively supporting Apple Silicon macOS, one can look to install respective MATLAB on a M1 Macbook by navigating to https://www.mathworks.com/downloads/web_downloads and Downloading for macOS (Apple Silicon).
Hope that helps!
Hi @krisctl,
I have checked that the matlab can be started normally outside of the jupyter-matlab-proxy. Here is some detailed information.
-----------------------------------------------------------------------------------------
MATLAB Version: 23.2.0.2409890 (R2023b) Update 3
MATLAB License Number: XXXXXXXX
Operating System: macOS Version: 14.1.1 Build: 23B81
Java Version: Java 1.8.0_392-b08 with Amazon.com Inc. OpenJDK 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------
MATLAB Version 23.2 (R2023b)
AUTOSAR Blockset Version 23.2 (R2023b)
Aerospace Blockset Version 23.2 (R2023b)
Aerospace Toolbox Version 23.2 (R2023b)
Audio Toolbox Version 23.2 (R2023b)
Automated Driving Toolbox Version 23.2 (R2023b)
Bioinformatics Toolbox Version 23.2 (R2023b)
Computer Vision Toolbox Version 23.2 (R2023b)
Control System Toolbox Version 23.2 (R2023b)
Curve Fitting Toolbox Version 23.2 (R2023b)
DDS Blockset Version 23.2 (R2023b)
Database Toolbox Version 23.2 (R2023b)
Datafeed Toolbox Version 23.2 (R2023b)
Deep Learning Toolbox Version 23.2 (R2023b)
Econometrics Toolbox Version 23.2 (R2023b)
Embedded Coder Version 23.2 (R2023b)
Filter Design HDL Coder Version 23.2 (R2023b)
Financial Instruments Toolbox Version 23.2 (R2023b)
Financial Toolbox Version 23.2 (R2023b)
Fixed-Point Designer Version 23.2 (R2023b)
Fuzzy Logic Toolbox Version 23.2 (R2023b)
GSW Oceanographic Toolbox Version 3.01 (R2011a)
Global Optimization Toolbox Version 23.2 (R2023b)
HDL Coder Version 23.2 (R2023b)
Image Acquisition Toolbox Version 23.2 (R2023b)
Image Processing Toolbox Version 23.2 (R2023b)
Industrial Communication Toolbox Version 23.2 (R2023b)
Instrument Control Toolbox Version 23.2 (R2023b)
MATLAB Coder Version 23.2 (R2023b)
MATLAB Compiler Version 23.2 (R2023b)
MATLAB Compiler SDK Version 23.2 (R2023b)
MATLAB Report Generator Version 23.2 (R2023b)
MATLAB Test Version 23.2 (R2023b)
M_Map - mapping toolbox (Author: rich@eos.ubc.ca) Version 1.4m Feb
Mapping Toolbox Version 23.2 (R2023b)
Medical Imaging Toolbox Version 23.2 (R2023b)
Mixed-Signal Blockset Version 23.2 (R2023b)
Model Predictive Control Toolbox Version 23.2 (R2023b)
NCTOOLBOX Tools for read-only access to Common ... Version 1.1.1-13-g8582810++
Optimization Toolbox Version 23.2 (R2023b)
Parallel Computing Toolbox Version 23.2 (R2023b)
Partial Differential Equation Toolbox Version 23.2 (R2023b)
Phased Array System Toolbox Version 23.2 (R2023b)
Predictive Maintenance Toolbox Version 23.2 (R2023b)
ROS Toolbox Version 23.2 (R2023b)
Radar Toolbox Version 23.2 (R2023b)
Reinforcement Learning Toolbox Version 23.2 (R2023b)
Requirements Toolbox Version 23.2 (R2023b)
Risk Management Toolbox Version 23.2 (R2023b)
Robotics System Toolbox Version 23.2 (R2023b)
Robust Control Toolbox Version 23.2 (R2023b)
Sensor Fusion and Tracking Toolbox Version 23.2 (R2023b)
SerDes Toolbox Version 23.2 (R2023b)
Signal Processing Toolbox Version 23.2 (R2023b)
Stateflow Version 23.2 (R2023b)
Statistics and Machine Learning Toolbox Version 23.2 (R2023b)
Symbolic Math Toolbox Version 23.2 (R2023b)
System Composer Version 23.2 (R2023b)
System Identification Toolbox Version 23.2 (R2023b)
Text Analytics Toolbox Version 23.2 (R2023b)
UAV Toolbox Version 23.2 (R2023b)
Vehicle Dynamics Blockset Version 23.2 (R2023b)
Wavelet Toolbox Version 23.2 (R2023b)
Thank you so much for your reply during the holidays and Happy Thanksgiving.
Hi @HappySpring
I just downloaded, installed and activated MATLAB R2023b Update 4
on my M1 Mac and was able to successfully run MATLAB through the kernel.
These are the steps I took:
Step 1: Install MATLAB
Download and install the Java Runtime from this link.
Downloaded and installed MATLAB R2023b for MACA64 from the MathWorks website.
Started MATLAB R2023b from on the desktop and activated it with my online licensing credentials. (Your activation step may be different based on your license type)
Ensured that I am able to repeatedly open it without it asking me for licensing information. This step ensures that I can use the Existing License Option when I start the MATLAB Kernel through Jupyter Lab.
Added the newly downloaded MATLAB onto my system path using the following command on the system terminal:
sudo ln -fs sudo ln -fs /Applications/MATLAB_R2023b.app/bin/matlab /usr/local/bin/matlab
Verified that this change took effect using the following command on the system terminal:
readlink -f `which matlab`
Output:
/Applications/MATLAB_R2023b.app/bin/matlab
Step 2: Setup Python environment
I use miniconda to manage my python environments.
Create a new python environment
conda create -n r2023b python=3.10 -y
Activate this conda environment called r2023b
conda activate r2023b
Install jupyter-matlab-proxy
python -m pip install jupyter-matlab-proxy
Verify that the packages were installed:
python -m pip list | grep matlab
Output:
jupyter-matlab-proxy 0.10.0
matlab-proxy 0.10.0
Activate my environment one more time, conda sometimes needs this to update the PATH after an installation.
conda activate r2023b
Verify that the jupyter lab
I'm about to launch is from this environment:
which jupyter
Note how the jupyter
executable is from the conda environment we r2023b
that we previously created
/Users/pbk/miniconda3/envs/r2023b/bin/jupyter
Finally, we are ready to start Jupyter Lab:
juptyer lab
Click on MATLAB Kernel, run a command, select Existing License and watch the magic:
Final result:
If I had to guess the issue on your machine might be setting the PATH as shown in Step 1. 5 sudo ln -fs sudo ln -fs /Applications/MATLAB_R2023b.app/bin/matlab /usr/local/bin/matlab
Hope this information helps!
Hi @prabhakk-mw,
Thank you for you detailed instructions.
Finally, I figured out what happened. I am able to fix the problem by installing another anaconda natively on apple silicon.
jupyter-matlab-proxy
probably requires that python and Matlab should share the same architecture. For my case, both native Matlab and native python on apple silicon are required. I installed anaconda in 2021 when its native support for apple silicon had not arrived. The anaconda works normally on my Mac (at least for my research) but it is still for intel. Anaconda supports apple silicon natively about May 2022. However, it cannot update from an intel version to an apple silicon version automatically. I believe that is why the 'jupyter-matlab-proxy' is looking for 'maci': the python (included in anaconda) on my Mac is for intel platform.
Figured out what happened, I installed the latest anaconda supporting apple silicon natively, reinstalled jypyter lab
and 'jupyter-matlab-proxy' in the new environment. Everything works after that.
Happy to hear you've worked it out!
I have Matlab 2023b installed on an M1 MacBook. And I got the following error messages after trying to start MatLAB from Jupiter Lab:
There is a folder named
maca64
at/Applications/MATLAB_R2023b.app/bin/
instead of themaci64
. It looks like that a new architecturemaca64
is introduced in Matlab 2023b, and it is not supported by thejupyter-matlab-proxy
yet.