How to install Matlab Jupyter engine on macOS
조회 수: 15 (최근 30일)
이전 댓글 표시
I'm trying to get the jupyter MATLAB engine to install. I've folowed every web tutorial I can find. None of them seem to work.
My situation:
- I have MATLAB 2019a
- I'm on macOS 10.14.3
- I'd vastly prefer to use the stock macOS python, which is python 2.7. I find python version control to be hellish. I don't develop in python and, hence, don't intentionally have any anaconda environments installed. I don't understand anaconda and have no reason to learn it.
I have run the following:
cd /Applications/MATLAB_R2019a.app/extern/engines/python/
python setup.py build --build-base=$(mktemp -d) install
which seems to run fine:
running build
running build_py
creating /var/folders/_4/z98cxbw12vzgf5859kpmr_vr0000gq/T/tmp.chM8aBXz/lib
creating /var/folders/_4/z98cxbw12vzgf5859kpmr_vr0000gq/T/tmp.chM8aBXz/lib/matlab
copying dist/matlab/mlarray.py -> /var/folders/_4/z98cxbw12vzgf5859kpmr_vr0000gq/T/tmp.chM8aBXz/lib/matlab
copying dist/matlab/__init__.py -> /var/folders/_4/z98cxbw12vzgf5859kpmr_vr0000gq/T/tmp.chM8aBXz/lib/matlab
copying dist/matlab/mlexceptions.py -> /var/folders/_4/z98cxbw12vzgf5859kpmr_vr0000gq/T/tmp.chM8aBXz/lib/matlab
creating /var/folders/_4/z98cxbw12vzgf5859kpmr_vr0000gq/T/tmp.chM8aBXz/lib/matlab/engine
copying dist/matlab/engine/fevalfuture.py -> /var/folders/_4/z98cxbw12vzgf5859kpmr_vr0000gq/T/tmp.chM8aBXz/lib/matlab/engine
copying dist/matlab/engine/matlabengine.py -> /var/folders/_4/z98cxbw12vzgf5859kpmr_vr0000gq/T/tmp.chM8aBXz/lib/matlab/engine
copying dist/matlab/engine/basefuture.py -> /var/folders/_4/z98cxbw12vzgf5859kpmr_vr0000gq/T/tmp.chM8aBXz/lib/matlab/engine
copying dist/matlab/engine/__init__.py -> /var/folders/_4/z98cxbw12vzgf5859kpmr_vr0000gq/T/tmp.chM8aBXz/lib/matlab/engine
copying dist/matlab/engine/matlabfuture.py -> /var/folders/_4/z98cxbw12vzgf5859kpmr_vr0000gq/T/tmp.chM8aBXz/lib/matlab/engine
copying dist/matlab/engine/futureresult.py -> /var/folders/_4/z98cxbw12vzgf5859kpmr_vr0000gq/T/tmp.chM8aBXz/lib/matlab/engine
copying dist/matlab/engine/enginehelper.py -> /var/folders/_4/z98cxbw12vzgf5859kpmr_vr0000gq/T/tmp.chM8aBXz/lib/matlab/engine
copying dist/matlab/engine/engineerror.py -> /var/folders/_4/z98cxbw12vzgf5859kpmr_vr0000gq/T/tmp.chM8aBXz/lib/matlab/engine
copying dist/matlab/engine/enginesession.py -> /var/folders/_4/z98cxbw12vzgf5859kpmr_vr0000gq/T/tmp.chM8aBXz/lib/matlab/engine
creating /var/folders/_4/z98cxbw12vzgf5859kpmr_vr0000gq/T/tmp.chM8aBXz/lib/matlab/_internal
copying dist/matlab/_internal/mlarray_sequence.py -> /var/folders/_4/z98cxbw12vzgf5859kpmr_vr0000gq/T/tmp.chM8aBXz/lib/matlab/_internal
copying dist/matlab/_internal/mlarray_utils.py -> /var/folders/_4/z98cxbw12vzgf5859kpmr_vr0000gq/T/tmp.chM8aBXz/lib/matlab/_internal
copying dist/matlab/_internal/__init__.py -> /var/folders/_4/z98cxbw12vzgf5859kpmr_vr0000gq/T/tmp.chM8aBXz/lib/matlab/_internal
running install
running install_lib
copying /var/folders/_4/z98cxbw12vzgf5859kpmr_vr0000gq/T/tmp.chM8aBXz/lib/matlab/engine/_arch.txt -> /usr/local/lib/python2.7/site-packages/matlab/engine
running install_egg_info
Removing /usr/local/lib/python2.7/site-packages/matlabengineforpython-R2018a-py2.7.egg-info
Writing /usr/local/lib/python2.7/site-packages/matlabengineforpython-R2018a-py2.7.egg-info
However, when I list the directory I get:
build dist setup.py
I have jupyter set up via launchctl. When try to start jupyter I get:
sudo launchctl load jupyter
Password:
/Applications/MATLAB_R2019a.app/extern/engines/python/jupyter: No such file or directory
And when I run a jupyter session, I see matlab as an available kernel, but the kernel dies when I start a new notebook.
Any ideas?
댓글 수: 0
답변 (2개)
LeChat
2020년 2월 18일
Try this short tutorial that I posted a couple years ago:
Hope this helps :)
댓글 수: 0
Mike Croucher
2023년 3월 1일
MathWorks have now released a MATLAB Kernel for Jupyter. You should find this easier to use! Official MathWorks MATLAB kernel for Jupyter released » The MATLAB Blog - MATLAB & Simulink
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Integration with Online Platforms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!