anyoptimization / pymoo

NSGA2, NSGA3, R-NSGA3, MOEAD, Genetic Algorithms (GA), Differential Evolution (DE), CMAES, PSO
https://pymoo.org
Apache License 2.0
2.14k stars 373 forks source link

install instructions #609

Open gnzsnz opened 3 weeks ago

gnzsnz commented 3 weeks ago

I'm having problems with the install instructions for linux

$ docker run -it --rm python:3.12 bash
root@fab087e4e18b:/$ pip install pymoo "numpy<=1.26.4"
root@fab087e4e18b:/$ python -c "from pymoo.util.function_loader import is_compiled;print('Compiled Extensions: ', is_compiled())"
Compiled Extensions:  False

What works is to install cython

$ docker run -it --rm python:3.12 bash
root@cf04d691d8b3:/$ pip install pymoo "numpy<=1.26.4" cython # <- add cython
root@cf04d691d8b3:/$ python -c "from pymoo.util.function_loader import is_compiled;print('Compiled Extensions: ', is_compiled())"
Compiled Extensions:  True
blankjul commented 1 week ago

Thanks! I am pretty sure this is related to the numpy 2 release. I will have a look at this and see if I can make pymoo upwards compatible.