How do I uninstall the MATLAB Engine API for Python?
17 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
MathWorks Support Team
il 6 Lug 2018
Modificato: MathWorks Support Team
il 10 Nov 2025
I have MATLAB R2016a and I would like to interface it with Python. I have Python 3.6 and I installed the MATLAB Engine API for Python. However, I receive the following error:
OSError: Please reinstall MATLAB Engine for Python or contact MathWorks Technical Support for assistance: No module named 'matlabengineforpython3_6'
From the system requirements, I saw that the latest Python version supported by MATLAB R2016a is the 3.4. Therefore, I think that the easiest way to solve this issue is to upgrade MATLAB to MATLAB R2018a, which supports Python 3.6.
However, I would like to know if I need to uninstall the MATLAB Engine API for Python that I already installed or if I can just install the new API.
If I need to uninstall the previous API, can you guide me through the process?
Risposta accettata
MathWorks Support Team
il 10 Nov 2025
Modificato: MathWorks Support Team
il 10 Nov 2025
There is no need for uninstalling the MATLAB Engine previously installed for a different MATLAB release. In fact, if you install the latest release of MATLAB, you can reinstall the MATLAB Engine API for Python following the instructions below from the MATLAB Documentation:
or
After you installed the latest MATLAB Engine API for Python, please close your Python instances and open it again.
You can now import the MATLAB engine and start it through the following commands:
>>> import matlab.engine >>> eng = matlab.engine.start_matlab()
If you open the Windows Task Manager, you will see that the MATLAB version called by Python is the latest one.
Please note that the same workflow works fine also if you want to install the MATLAB Engine related to a previous MATLAB release.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Call MATLAB from Python in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!