thirdorder求解力常數(shù)
在安裝編譯thirdorder的過程中,出現(xiàn)了錯誤。請問有人知道怎么解決嗎?anaconda已經(jīng)安裝好
[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
返回小木蟲查看更多
京公網(wǎng)安備 11010802022153號
最近才裝過 但我忘了有沒有這個(gè)報(bào)錯了 給你頂頂
請問您解決這個(gè)問題了嗎?我現(xiàn)在也遇到了
error: spglib/spglib.h: No such file or directory
這不寫了嗎
然后呢?在setup.py里面已經(jīng)定義了spglib.h的位置了,"/home/gengzi/apps/spglib/include",include目錄下明明有spglib.h,為啥他說沒有?
哦,我知道了,得在include里面加一個(gè)spglib文件夾,把spglib.h復(fù)制到這個(gè)文件夾下面
可能是spglib的版本有變化了的,早期版本中spglib.h放在了include/spglib/目錄下,而新版本中放到了include/目錄下。。將thirdorder_core.c里的第559行#include "spglib/spglib.h" 改為: #include "spglib.h"
,
太牛了。「兄x老師!