7
$\begingroup$

I am trying to install the thirdorder script that is mean to work in tandem with ShengBTE on an Ubuntu OS, but I'm getting the following error:

npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   17 | #warning "Using deprecated NumPy API, disable it with " \
      |  ^~~~~~~
thirdorder_core.c:559:10: fatal error: spglib/spglib.h: No such file or directory
  559 | #include "spglib/spglib.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1

Please direct me how to solve this.

$\endgroup$
16
  • 1
    $\begingroup$ What are you doing to try to install this package? From the README: "Compiling can be as easy as running bash ./compile.sh. However, if you have installed spglib to a nonstandard directory, you will have to perform some simple editing on setup.py so that the compiler can find it. Please refer to the comments in that file." This looks to be the issue you are having, so you would need to install spglib and let the program know where it is by editing setup.py. $\endgroup$
    – Tyberius
    Jul 20, 2021 at 15:06
  • $\begingroup$ @Tyberius i am trying to learn how to compile lattice thermal conductivity in QE. Since i am a beginner to all this, and have just installed Ubuntu, I am facing all these issues. It isn't solved yet, but i am trying. $\endgroup$ Jul 20, 2021 at 16:49
  • $\begingroup$ Yeah a lot of these scientific packages can be a real pain to install. Try messing with spglib installation and you can update your question with any additional issues you run into. $\endgroup$
    – Tyberius
    Jul 21, 2021 at 0:51
  • $\begingroup$ Which versions of thirdorder, Python and numpy are you using? $\endgroup$ Jul 21, 2021 at 1:34
  • 1
    $\begingroup$ Actually, it looks like you haven't installed the libsymspg-dev package. $\endgroup$ Jul 21, 2021 at 1:41

1 Answer 1

3
$\begingroup$

The thirdorder program uses the symmetry library "spglib", and needs its header files (files ending .h). The error you're seeing is telling you that the compiler can't find these header files, probably because they haven't been installed on your machine.

The files aren't usually installed if you just select the spglib library in your package manager, you will usually have to install the spglib developer package; on Ubuntu, the relevant package is libsymspg-dev. While you're installing it, it's worth getting the Python bindings as well, which is python3-spglib.

$\endgroup$
1
  • 1
    $\begingroup$ Thank you for your answer and explanation. $\endgroup$ Oct 27, 2022 at 6:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .