1

I have attempted installing guided LDA by using the following command:

pip3 install guidedlda

However, I get the following error:

  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

The creator of the package recommends a way (shown below) which I am unable to understand.

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

Any ideas?

User9102d82
  • 1,172
  • 9
  • 19
Dogukan Yılmaz
  • 556
  • 2
  • 15
  • What exactly is puzzling you in the recommended way? – dedObed Feb 03 '20 at 19:25
  • Should I run it from command window? it only works on Linux? – Dogukan Yılmaz Feb 03 '20 at 19:31
  • First line is a web link. The rest of the lines are `linux comands`: first command `cd` enters directory named `GuidedLDA`, second command runs a `shell` script called `build_dist.sh` - I believe this is going to build the distribution, third command `python setup.py sdist` runs script named `setup.py`, and finally the `pip install -e .` performs installation of packages from the current directory. – User9102d82 Feb 03 '20 at 19:40
  • https://stackoverflow.com/search?q=%5Bpip%5D+fatal+error%3A+Python.h%3A+No+such+file+or+directory – phd Feb 03 '20 at 22:25
  • should copy paste lin to linux command prompt ? – Dogukan Yılmaz Feb 04 '20 at 10:27

0 Answers0