Reputation: 1
Due to certain dependancies I have to downgrade my Matlab from 2024b to 2022b. I am working in a conda environment with python 3.9.12
After trying to install matlabengine with:
cd "matlabroot/extern/engines/python"
python setup.py install
I get this error:
/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` directly.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
********************************************************************************
!!
self.initialize_options()
/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/setuptools/_distutils/cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` and ``easy_install``.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
See https://github.com/pypa/setuptools/issues/917 for details.
********************************************************************************
!!
self.initialize_options()
/opt/anaconda3/envs/myenv/lib/python3.9/site-packages/setuptools/command/sdist.py:122: SetuptoolsDeprecationWarning: `build_py` command does not inherit from setuptools' `build_py`.
!!
********************************************************************************
Custom 'build_py' does not implement 'get_data_files_without_manifest'.
Please extend command classes from setuptools instead of distutils.
See https://peps.python.org/pep-0632/ for details.
********************************************************************************
!!
self._add_data_files(self._safe_data_files(build_py))
error: The installation of MATLAB is corrupted. Please reinstall MATLAB or contact Technical Support for assistance.
which didn't appear when I had 2024b.
I have tried reinstalling 2022b and got the same error. I can't install outside the environment as I have python 3.12 which isn't supported by MATLAB 2022b.
Upvotes: 0
Views: 27
Reputation: 68
Try the following:
Ensure MATLAB R2022b runs and extern/engines/python/setup.py
exists.
Install:
pip install setuptools==58.0.4 wheel
Install Engine:
cd "matlabroot/extern/engines/python"
python -m pip install .
Upvotes: 0