首页 > 解决方案 > 安装引导式 LDA 包

问题描述

我尝试guided LDA使用以下命令进行安装:

pip3 install guidedlda

但是,我收到以下错误:

  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.6m -c guidedlda/_guidedlda.c -o build/temp.linux-x86_64-3.6/guidedlda/_guidedlda.o
  guidedlda/_guidedlda.c:4:20: fatal error: Python.h: No such file or directory
   #include "Python.h"
                      ^
  compilation terminated.
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for guidedlda

包的创建者推荐了一种我无法理解的方式(如下所示)。

https://github.com/vi3k6i5/GuidedLDA
cd GuidedLDA
sh build_dist.sh
python setup.py sdist
pip install -e .

有任何想法吗?

标签: pythonpiplda

解决方案


推荐阅读