Filter löschen
Filter löschen

How to run a python file .py in matlab

16 Ansichten (letzte 30 Tage)
PA
PA am 29 Sep. 2023
Beantwortet: Umang Pandey am 9 Nov. 2023
I am using Anaconda and then i saved the python anaconda script file as .py file extension and when i call the python script file i get this error.
Error using <string>><module> (line 1) Python Error: ModuleNotFoundError: No module named 'skopt' . However i already have installed scikit-optimize in ana conda. I refer this too
Python Error: ModuleNotFoundError: No module named 'numpy' but i still have the issue
  1 Kommentar
Rik
Rik am 1 Okt. 2023
Can you post Matlab code and a minimal example that reproduces the error?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Umang Pandey
Umang Pandey am 9 Nov. 2023
Hi,
I understand that you are encountering an error while calling your python anaconda script from MATLAB environment.
To call Python modules in MATLAB, you must have a supported version of the reference implementation (CPython) installed on your system, as mentioned in the following documentation:
Thus, MATLAB does not support Anaconda python scripts by default. However, there are certain workarounds to call Conda scripts from MATLAB which requires modifying the MATLAB environment variable.
Please refer the following MATLAB answer for more information:
Best,
Umang

Kategorien

Mehr zu Call Python from MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by