Hi Debbie,
As per my understanding the error message suggests that the required DLL file, "matlabruntimeforpython3_9.pyd", could not be found. Please refer to the steps below to troubleshoot the error:
- It is mentioned that MATLAB runtime environment is located in "C:\Program Files\MATLAB\MATLAB Runtime\v912\bin\win64". Verify that this directory contains the necessary files, including "matlabruntimeforpython3_9.pyd".
- Activate your conda virtual environment by running the following command in your terminal or command prompt:
conda activate <your_virtual_environment_name>
- Add the directory containing the MATLAB Runtime DLL file to your system's PATH environment variable. Replace "C:\Program Files\MATLAB\MATLAB Runtime\v912\bin\win64" with the actual path to the directory where the MATLAB Runtime is installed.Please run the following command in your terminal or command prompt:
set PATH=C:\Program Files\MATLAB\MATLAB Runtime\v912\bin\win64;%PATH%
- Try importing the package again in your Python script:
import MyFunction
The import should now work without any DLL-related errors.
Hope this helps!
Regards,
Maneet Bagga