mimesis-inria / caribou

Multi-physics computation library
GNU Lesser General Public License v3.0
29 stars 17 forks source link

Error when building caribou #143

Closed Abdelrahman-Alkhodary closed 1 year ago

Abdelrahman-Alkhodary commented 1 year ago

Hello all

I'm trying to build caribou on ubuntu 20.04 but i'm facing this problem

CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
  Could NOT find Python (missing: Python_EXECUTABLE Python_LIBRARIES
  Python_INCLUDE_DIRS Interpreter Development) (Required is at least version
  "3.8.10")
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.16/Modules/FindPython/Support.cmake:2214 (find_package_handle_standard_args)
  /usr/share/cmake-3.16/Modules/FindPython.cmake:304 (include)
  /home/abdelrahman/sofa/SOFA_v22.12.00/plugins/SofaPython3/lib/cmake/SofaPython3/SofaPython3Config.cmake:37 (find_package)
  CMakeLists.txt:62 (find_package)

I have python 3.8.10 on my ubuntu and also ran the following commands but same problem

sudo apt install python3.8-dev sudo apt-get install python3-distutils \ && curl -L https://bootstrap.pypa.io/pip/get-pip.py --output /tmp/get-pip3.py \ && python3.8 /tmp/get-pip3.py \ && python3.8 -m pip install --upgrade pip \ && python3.8 -m pip install numpy scipy

and I have added these variables to .bashrc

export SOFA_ROOT=/home/abdelrahman/sofa/SOFA_v22.12.00
export SOFAPYTHON3_ROOT=/home/abdelrahman/sofa/SOFA_v22.12.00/plugins/SofaPython3
export SP3_ROOT=/home/abdelrahman/sofa/SOFA_v22.12.00/plugins/SofaPython3
Abdelrahman-Alkhodary commented 1 year ago

Hello @hugtalbot @jnbrunet

Sorry to bother you, but any thoughts about this problem

jnbrunet commented 1 year ago

You could try to force the python installation used. This is what we do for CI: https://github.com/mimesis-inria/caribou/blob/master/.github/workflows/ubuntu.yml#L113

You can do this but setting the CMake variable PYTHON_EXECUTABLE to your python 3.8 executable. Clear you CMake cache before using this option to make sure you start from a good base.