ModuleNotFoundError: No module named 'matlab' Only when checkIraceScenario(scenario = scenario)

431 views
Skip to first unread message

錢燕飛

unread,
Jun 29, 2021, 5:13:44 AM6/29/21
to The irace package: Iterated Racing for Automatic Configuration
Hi,
my laptop os : macOS 10.15.7
python interpret uses anaconda and set in bash_profile截屏2021-06-29 17.00.37.png
in my terminal, I can import matlab.engine
截屏2021-06-29 17.01.45.png
in Rstudio console,  I also can import 截屏2021-06-29 17.06.54.png
but  there always is an error when I input checkIraceScenario(scenario = scenario)
and the error is No module named "matlab"
截屏2021-06-29 17.13.27.png
I am very sorry to delay valuable time because of such a basic problem
But I've tried a lot and can not solve it 

Manuel López-Ibáñez

unread,
Jun 29, 2021, 5:22:49 AM6/29/21
to The irace package: Iterated Racing for Automatic Configuration
Hi,

This is not an irace problem but, in any case, when I get this type of error it is typically because the python version I'm using on one side is not the same python version I use in the other due to some error in my setup. Are you 100% sure that target-runner.py is executed by the same Python binary in the same location that reticulate is using?

Cheers,

Manuel.

Manuel López-Ibáñez

unread,
Jun 29, 2021, 5:25:00 AM6/29/21
to The irace package: Iterated Racing for Automatic Configuration
At the top of the file in target-runner.py, where it says something like:

#!/usr/bin/python

you need to use exactly the same path that reticulate prints. If that doesn't fix it, then I'm out of ideas. I hope someone else has another suggestion.

Best,

Manuel

S. Sadeghi

unread,
Jun 29, 2021, 9:22:12 AM6/29/21
to The irace package: Iterated Racing for Automatic Configuration
Hi, 

I had this problem and Solved it based on the following:

1. Check the python version that your matlab support it(look at the picture)
2. Go to python.org and download the required version and then install it.

SharedScreenshot.jpg
Reply all
Reply to author
Forward
0 new messages