-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't get matlab to work with Jupyter #39
Comments
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
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'
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
conda create -n freshEnv python=3.10 -y
conda activate freshEnv
python -m pip install jupyter-matlab-proxy jupyterlab
# This reloads the environment to pick up the changes to your environment
conda activate freshEnv
# ensure that the freshly installed executables are picked up by running which again:
which jupyter matlab-proxy-app
# Example output on my machine:
# /home/user/miniconda3/envs/freshEnv/bin/jupyter
# /home/user/miniconda3/envs/freshEnv/bin/matlab-proxy-app I hope this information helps fix these issues. |
My guess is that MATLAB is occasionally taking longer to start in that environment. You will see the MATLAB 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. 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.
The text was updated successfully, but these errors were encountered: