Install
- Make sure Matlab is installed on your computer
- Open anaconda prompt as an administrator
- Activate the environment you want to use Matlab in
1
conda activate insert-name-of-environment-here
- if you don’t know what an environment is, check this out: https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
- find the matlab directory
1
matlab -batch matlabroot
https://www.scivision.dev/matlab-engine-python-install/
- cd to that directory
- in my case I did:
1 2
cd C:\Users\Matth> cd C:\Program Files\MATLAB\R2021a
- in my case I did:
- Run the install script
1 2
cd extern/engines/python python setup.py install
- Test to see if it works by opening a Jupyter notebook or Spyder file and run
1
import matlab.engine
- if no errors, you’re good to go.