esa / pygmo2

A Python platform to perform parallel computations of optimisation tasks (global and local) via the asynchronous generalized island model.
https://esa.github.io/pygmo2/
Mozilla Public License 2.0
434 stars 57 forks source link

Mac OS install breaks— cmake only finds Python2 #39

Closed mattppal-old closed 3 years ago

mattppal-old commented 4 years ago

When attempting to build on Mac, cmake will only find Python2 and abort. I believe there are functions around specifically finding python3 packages, which should probably be the default since Python2 is no longer supported.

bluescarni commented 4 years ago

Thanks to the report, we'll move to using FindPython3 in the next pygmo version.

In the meantime, can you try setting the value of the PYTHON_EXECUTABLE CMake variable to the path to the Python interpreter to see if this works around the issue for you?

mattppal-old commented 4 years ago

I'm having difficulty doing so— I opted to install miniconda and use a conda env for my purposes. It's much easier that way

bluescarni commented 4 years ago

I am afraid this will have to wait a bit more. The machinery we use for Python detection is shared among various projects, not all of which are ready to require such a recent CMake version (i.e., >= 3.12).

I will revisit this for pygmo 2.17.

bluescarni commented 3 years ago

We are now using FindPython3 after the merge of #81. This will be part of the upcoming 2.18 release.