Closed AtWillTeam closed 1 year ago
Try copying the build/python/lcmaes.so
file into the dir that has ptest.py
and try again. If it works, then you'll have to figure how to load it from another dir.
I copied it into the python/
dir where the ptest.py
is then an ImportError
occur: /lib/x86_64-linux-gnu/libboost_python310.so.1.74.0: undefined symbol: PyCMethod_New
.
Update: I find the reason, the python version I use is 3.8 while the libboost works for 3.10. I create a python3.10 environment and it works without error. The problem is fixed! Now I will figure how to load it in other dir.
I wonder if it is possible to control the stop criteria in Python, e.g., stop when the fitness reach a value or the evaluation budget exhausted?
Have you looked at the set_ftarget
function (http://beniz.github.io/libcmaes/doc/html/classlibcmaes_1_1Parameters.html#a6ace7e5d230fcf82c70ba2dd3a801f97) as it appears to be hooked via the Python wrapper ?
Yes, it is exactly what I need. Thanks 👍 👍
Hello, I have successfully used
cmake .. -DCMAKE_INSTALL_PREFIX=~/.local/ -DLIBCMAES_BUILD_PYTHON=ON
to build the Python bindings. But aftermake install
and exporting the LD_LIBRARY_PATH, the ptest.py reportsModuleNotFoundError: no module named 'lcmaes'
. The processes look successful except some unused parameter warnings inmake install
. I wonder what causes this issue and how to solve it. Thanks.