简体   繁体   中英

Python_LIBRARY in CMake NotFound

I'm trying to build the open-source software LMGC90 ( https://git-xen.lmgc.univ-montp2.fr/lmgc90/lmgc90_user/-/wikis/compilation ) and I have a trouble when I try to use the command >cmake. Details are below:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: PYTHON_LIBRARY

 linked by target "ann_manh" in directory /home/tphan/lmgc90_user_2021.rc1/src/contribs/ann-1.1.2/wrap linked by target "ann_eucl" in directory /home/tphan/lmgc90_user_2021.rc1/src/contribs/ann-1.1.2/wrap linked by target "lmgc90" in directory /home/tphan/lmgc90_user_2021.rc1/src/ChiPy

The full error message is:

tphan@tphan-XPS-15-9570:~/lmgc90_user_2021.rc1/build$ cmake .. -DPYTHON_EXECUTABLE=/usr/bin/python3
-- You try to build LMGC90_dev
fatal: not a git repository (or any of the parent directories): .git
-- Building  git branch
-- A library with LAPACK API found.
-- Found Python executable: /usr/bin/python3.8
-- Found Python library: PYTHON_LIBRARY-NOTFOUND
-- Python version is : 3.8.10
-- Python include dir is : /usr/include/python3.8
-- Cython not found... deactivate rTree Python binding
-- Matlib Library used  : /home/tphan/lmgc90_user_2021.rc1/build/lib/libmatlib.so
-- Sparse linear algebra include path found: /home/tphan/lmgc90_user_2021.rc1/build/include
-- Sparse linear algebra libraries found: /home/tphan/lmgc90_user_2021.rc1/build/lib/libdmumps.so
-- Sparse linear algebra binding found: /home/tphan/lmgc90_user_2021.rc1/src/contribs/Mumps_SparseLinearAlgebra.f90
-- matlib library : /home/tphan/lmgc90_user_2021.rc1/build/lib/libmatlib.so
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PYTHON_LIBRARY
    linked by target "ann_manh" in directory /home/tphan/lmgc90_user_2021.rc1/src/contribs/ann-1.1.2/wrap
    linked by target "ann_eucl" in directory /home/tphan/lmgc90_user_2021.rc1/src/contribs/ann-1.1.2/wrap
    linked by target "lmgc90" in directory /home/tphan/lmgc90_user_2021.rc1/src/ChiPy

-- Configuring incomplete, errors occurred!
See also "/home/tphan/lmgc90_user_2021.rc1/build/CMakeFiles/CMakeOutput.log".
See also "/home/tphan/lmgc90_user_2021.rc1/build/CMakeFiles/CMakeError.log".```


Do you know how I can fix this?

You must to specify the path to the Python library as:

cmake.. -DPYTHON_EXECUTABLE=/usr/bin/python3 -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.8.so

Best regards

Juan Carlos

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM