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.

  • 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 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 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 at 0:51
  • $\begingroup$ Which versions of thirdorder, Python and numpy are you using? $\endgroup$ Jul 21 at 1:34
  • $\begingroup$ Actually, it looks like you haven't installed the libsymspg-dev package. $\endgroup$ Jul 21 at 1:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.