Install
- Make sure Matlab is installed on your computer
- Open anaconda prompt as an administrator
- Activate the environment you want to use Matlab in
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
matlab -batch matlabroot
https://www.scivision.dev/matlab-engine-python-install/
- cd to that directory
- in my case I did:
cd C:\Users\Matth>
cd C:\Program Files\MATLAB\R2021a
- Run the install script
cd extern/engines/python
python setup.py install
- Test to see if it works by opening a Jupyter notebook or Spyder file and run
import matlab.engine
- if no errors, you’re good to go.