Python 如何在Jupyter中使用MATLAB?

Python 如何在Jupyter中使用MATLAB?,python,matlab,jupyter,Python,Matlab,Jupyter,我似乎把一切都安装好了。我可以在jupyter中运行disp“statement”。内核框显示Matlab 但我还是在朱皮特 import matlab.engine 错误: The import statement 'import matlab.engine' cannot be found or cannot be imported. Imported names must end with '.*' or be fully qualified. 在MATLAB方面,在我的conda环境

我似乎把一切都安装好了。我可以在jupyter中运行disp“statement”。内核框显示Matlab

但我还是在朱皮特

import matlab.engine
错误:

The import statement 'import matlab.engine' cannot be found or cannot be imported. Imported names must end with '.*' or be fully qualified.
在MATLAB方面,在我的conda环境中,我能够进入Python 3.6命令行并执行

import matlab.engine
这意味着我已经实现了MATLAB-Python集成

是的

python -m matlab_kernel install --user

显示

没问题

我还能试什么呢?

好的,我想出来了

笔记本要么在Ipython模式下运行,要么在Matlab模式下运行。我在Matlab模式下,正在尝试Ipython模式的教程代码

jupyter kernelspec list
  matlab     /home/me/.local/share/jupyter/kernels/matlab
  python2    /home/me/.local/share/jupyter/kernels/python2
  python3    /home/me/anaconda3/envs/matlab/share/jupyter/kernels/python3