Closed dfosterhill closed 1 year ago
I have the same issue on Windows, "Error connecting to MATLAB. Check the status of MATLAB by clicking the "Open MATLAB" button. Retry after ensuring MATLAB is running successfully"
Does work with Anaconda y Jupyter 3.x
Python 3.x y jupyter 4.x Its Works!!!
Hello @dfosterhill,
Thank you for trying out jupyter-matlab-proxy
!
To workaround this issue, one could:
Use Jupyter Lab instead of Jupyter Notebook as shown below:
jupyter lab
If Jupyter Lab is not usable in your environment, one could also downgrade the version of jupyter-server as suggested in jupyter/notebook#6702 as follows:
pip install --upgrade 'jupyter-server<2.0.0'
MATLAB Kernel
or Open MATLAB
icons not showing on your Jupyter Lab interface, would you please try the steps mentioned in the troubleshooting guide, especially the section with the headline as
If the integration is not showing up as an option to the dropdown box in the Jupyter notebook:
If the suggested solutions in the troubleshooting guide don’t work, then please share the output for the below commands:
# list the python environment
which python pip
# list the version of python & pip
python --version
pip --version
# list the packages installed
python -m pip list | grep -E "jupyter|matlab-proxy|jupyter-matlab-proxy|notebook"
# list the jupyter executable
which jupyter
# list the matlab-proxy-app on path
which matlab-proxy-app
# list whether the server extensions are enabled
jupyter serverextension list
jupyter nbextension list
jupyter labextension list
It is sometimes possible that the Jupyter Lab environment requires one to explicitly activate extensions for use with Jupyter Lab, one can do it from the interface as shown below. After making these changes, be sure to restart jupyter lab
to verify that they have taken effect.
jupyter-matlab-proxy
installed, then one should only see the following options under New:
conda create -n freshEnv python=3.10 -y
conda activate freshEnv
python -m pip install jupyter-matlab-proxy jupyterlab
conda activate freshEnv
which jupyter matlab-proxy-app
I hope this information helps fix these issues.
Please do let me know if I can be of further assistance!
@otavo
My guess is that MATLAB is occasionally taking longer to start in that environment. Could you please check the logs that are printed on the terminal to verify that MATLAB has started and has completed its startup sequence ?
You will see the MATLAB >>
prompt on the terminal output when MATLAB has completed its startup sequence
Retrying the execution of the notebook cell after MATLAB has completed its startup sequence should resolve the error message.
PS: As of jupyter-matlab-proxy version 0.5.4 we increased this timeout to 120 seconds.
If you are seeing this message before that time and are on a version of the proxy thats newer than 0.5.4
, please do create another issue to continue the investigation.
Thank you!
Please feel free to create a new issue if this behavior is still observed.
Hello.
Have tried to follow the instructions at the repo. Same with these here: http://jmlilly.net/jupyter-matlab. Matlab is indeed on my path. I have done the install of jupyter-matlab-proxy. If I then launch jupyter lab, the matlab option does not show up. If I instead launch jupyter notebook, and select 'new' from the dropdown at right, I see three matlab options:
If I pick 'kernel' I get a 'creating notebook failed' window with a large red 'forbidden' rectangle. The same happens with the other two matlab options.
Running Monterey on a m1 Mac.
Dave.