thirdorder求解力常数
在安装编译thirdorder的过程中,出现了错误。请问有人知道怎么解决吗?anaconda已经安装好
[slb@slb thirdorder]$ ./compile.sh
running build
running build_ext
building 'thirdorder_core' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/lib64/python2.6/site-packages/numpy/core/include -I/home/slb/Desktop/spglib-1.11.2.1/include -I/usr/include/python2.6 -c thirdorder_core.c -o build/temp.linux-x86_64-2.6/thirdorder_core.o
thirdorder_core.c:559:27: error: spglib/spglib.h: No such file or directory
thirdorder_core.c: In function ‘__pyx_f_15thirdorder_core_18SymmetryOperations___spg_get_dataset’:
thirdorder_core.c:4895: error: ‘SpglibDataset’ undeclared (first use in this function)
thirdorder_core.c:4895: error: (Each undeclared identifier is reported only once
thirdorder_core.c:4895: error: for each function it appears in.)
thirdorder_core.c:4895: error: ‘__pyx_v_data’ undeclared (first use in this function)
thirdorder_core.c:4934: warning: implicit declaration of function ‘spg_get_dataset’
thirdorder_core.c:6011: warning: implicit declaration of function ‘spg_free_dataset’
thirdorder_core.c: In function ‘__pyx_f_5numpy_PyDataType_SHAPE’:
thirdorder_core.c:19446: warning: implicit declaration of function ‘PyDataType_HASSUBARRAY’
error: command 'gcc' failed with exit status 1 返回小木虫查看更多
最近才装过 但我忘了有没有这个报错了 给你顶顶
请问您解决这个问题了吗?我现在也遇到了
error: spglib/spglib.h: No such file or directory
这不写了吗
然后呢?在setup.py里面已经定义了spglib.h的位置了,"/home/gengzi/apps/spglib/include",include目录下明明有spglib.h,为啥他说没有?
哦,我知道了,得在include里面加一个spglib文件夹,把spglib.h复制到这个文件夹下面
可能是spglib的版本有变化了的,早期版本中spglib.h放在了include/spglib/目录下,而新版本中放到了include/目录下。。将thirdorder_core.c里的第559行#include "spglib/spglib.h" 改为: #include "spglib.h"
,
太牛了!!感谢老师!!