-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake Error Could NOT find Python (missing: Development.Module) #20
Comments
I can't reproduce your issue, with the following workflow: FROM ubuntu:24.04
RUN apt-get update && apt-get install -qqy \
build-essential \
cmake \
git \
python3-dev
RUN git clone --recursive https://github.com/meco-group/fatrop
RUN cmake -B build -S fatrop -DWITH_PYTHON=ON Can you provide more informations on your system, the commit you are on, and the command you use to configure the project ? |
Thank you for your reply. It made me realize that the problem is because I am on Ubuntu 20.04 with CMake 3.16 (which is the latest release on Debian for Cmake). I discovered that "Development.Module" while finding Python was only introduced in CMake 3.18. Changing that line in CMakeLists.txt to
solves my issue. I also had to install pybind11 system-wide using
|
You are right, thanks. We could, either:
if(CMAKE_VERSION VERSION_LESS "3.18")
find_package(Python REQUIRED COMPONENTS Interpreter Development)
else()
find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
endif() The system-wide pybind11 is a good solution, but not the only one: you could also have used the git submodule, if did not want (or could not) run that |
Hi Guilhem and Maxim, Thanks a lot for figuring this out and the suggestions for fixing the issues. We think the third option is the best solution. I implemented it (see commit bcf259d). Best, |
Issue is explained here: #17 (comment)
Temporary solution is to change these lines in CMakeList.txt back to
The text was updated successfully, but these errors were encountered: