How do I uninstall the MATLAB Engine API for Python?

8 ビュー (過去 30 日間)
MathWorks Support Team
MathWorks Support Team 2018 年 7 月 6 日
回答済み: MathWorks Support Team 2018 年 7 月 6 日
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?

採用された回答

MathWorks Support Team
MathWorks Support Team 2018 年 7 月 6 日
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, which is R2018a, 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 件)

カテゴリ

Help Center および File ExchangeCall MATLAB from Python についてさらに検索

製品


リリース

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by