just another problem with Planck likelihood

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Claudio Nahmad
Posts: 8
Joined: January 14 2017
Affiliation: Facultad de Ciencias UNAM
Contact:

just another problem with Planck likelihood

Post by Claudio Nahmad » August 08 2023

Hello, i'm doing a clean install of Planck 2018 likelihood. I have done it several times but this is a new error and can't seem to find a way to solve it.

./waf configure ran ok, except for:

Code: Select all

Testing pyembed configuration                                              : Could not build a python embedded interpreter 
No suitable python distribution found 
Cause : 'The configuration failed
(complete log in /scratch/data/planck_likelihood_2018/code/plc_3.0/plc-3.01/build/config.log)' 
Compilation will continue without it (but I strongly advise that you install it) 
but after finishing, was prompted to run ./waf install, so i did it, and then some fatal errors:

Code: Select all

install /scratch/data/planck_likelihood_2018/code/plc_3.0/plc-3.01/lib/python/site-packages/clik/parobject.py (from src/python/clik/parobject.py)
src/python/clik/lkl_lensing.pyx.c:6:20: fatal error: Python.h: No such file or directory
 #include "Python.h"
                    ^
compilation terminated.

src/python/clik/lkl.pyx.c:6:20: fatal error: Python.h: No such file or directory
 #include "Python.h"
                    ^
compilation terminated.

src/python/clik/parametric.pyx.c:6:20: fatal error: Python.h: No such file or directory
 #include "Python.h"
                    ^
compilation terminated.

src/plik/component_plugin/rel2015/rel2015.pyx.c:6:20: fatal error: Python.h: No such file or directory
 #include "Python.h"
                    ^
compilation terminated.

Waf: Leaving directory `/scratch/data/planck_likelihood_2018/code/plc_3.0/plc-3.01/build'
Build failed
 -> task in 'lkl_lensing' failed with exit status 1 (run with -v to display more information)
 -> task in 'lkl' failed with exit status 1 (run with -v to display more information)
 -> task in 'parametric' failed with exit status 1 (run with -v to display more information)
 -> task in 'rel2015' failed with exit status 1 (run with -v to display more information)
I'm running the installation as follows:
  • within a conda environment with python 3.9.12, cython 0.29.32 (since cython 3.0 is not working correctly within the CLASS code), numpy, astropy
  • GCC 4.8.5
  • ./waf configure --lapack_mkl={absolute path to intel mkl} --cfitsio_prefix={absolute path to a personal installation of cfitsio, 3.4.5}
Thanks to anyone that can point me a way to solve this!
Greetings,
-Claudio Nahmad

Claudio Nahmad
Posts: 8
Joined: January 14 2017
Affiliation: Facultad de Ciencias UNAM
Contact:

Re: just another problem with Planck likelihood

Post by Claudio Nahmad » August 08 2023

In case anyone has had this problem, i found a relevant issue here: https://github.com/benabed/clik/issues/1.

I solved the issue by using a conda environment with python 2.7, instead of 3.9 or 3.11 which neither worked.

Jesus Torrado
Posts: 37
Joined: April 15 2013
Affiliation: RWTH Aachen
Contact:

Re: just another problem with Planck likelihood

Post by Jesus Torrado » September 07 2023

Thanks for reporting, Claudio!

In case it is of help to other people, in Debian-based linux distros (Debian, Ubuntu, Mint...), assuming you are using your system-wide Python for Cobaya, you can fix this by installing the Python headers:

Code: Select all

$ sudo apt install libpython3-dev

Post Reply