I am trying to use platypus. I did all the required steps, install with pip, then uninstall and install again and I still get the error "ImportError: cannot import name 'NSGAII' from 'platypus'"
Anyone knows how to fix it ? thanks
here is the code
from platypus import NSGAII, Problem, Real
def schaffer(x):
return [x[0] ** 2, (x[0] - 2) ** 2]
problem = Problem(1, 2)
problem.types[:] = Real(-10, 10)
problem.function = schaffer
algorithm = NSGAII(problem)
algorithm.run(10000)
create
file in your current directory to resolve the import issue