python 3.8,linux服务器,安装第三方库(allennlp)
blis/cy.c:196:12: fatal error: longintrepr.h: 没有那个文件或目录
#include "longintrepr.h"
^~~~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
gcc: error: preshed/maps.cpp: 没有那个文件或目录
gcc: fatal error: no input files
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
使用pip在服务器上安装第三方包的时候出现了这两个错误
怎么搞也搞不好,longintrepr.h好像是在python-dev里有,可以尝试
sudo apt-get install python-dev
但是我这里依旧不行,最后在stackoverflow上根据 gcc: error: preshed/maps.cpp: 没有那个文件或目录发现是spacy和python的版本问题,我这里换成python3.10就可以了.其他版本的python和spacy可能也可以.