9

http://pypi.python.org/pypi/pylinkgrammar

I am encountering an error when attempting to install pylinkgrammar:

Running setup.py egg_info for package pylinkgrammar

Installing collected packages: pylinkgrammar
  Running setup.py install for pylinkgrammar
...
running build_ext

building 'pylinkgrammar/_clinkgrammar' extension

swigging pylinkgrammar/link_grammar.i to pylinkgrammar/link_grammar_wrap.c

swig -python -o pylinkgrammar/link_grammar_wrap.c pylinkgrammar/link_grammar.i

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c pylinkgrammar/link_grammar_wrap.c -o build/temp.linux-x86_64-2.7/pylinkgrammar/link_grammar_wrap.o

pylinkgrammar/link_grammar_wrap.c:2973:40: fatal error: link-grammar/link-includes.h: No such file or directory

compilation terminated.

error: command 'gcc' failed with exit status 1
m.brindley
  • 1,218
  • 10
  • 19
LO_pz
  • 101
  • 1

4 Answers4

6

This worked for me:

sudo apt-get install liblink-grammar4-dev
Mathieu Rodic
  • 6,637
  • 2
  • 43
  • 49
5

Besides installing the liblink-grammar4 package also install liblink-grammar4-dev package which is available in synaptic.

I had been grappling with the same for over an hour and it worked for me

Sankalp
  • 1,128
  • 4
  • 14
  • 31
  • 1
    +1 Thanks that one worked for me...Not even mentioned here in youtube link about the dependency http://www.youtube.com/watch?v=Wk8zAr0R9zQ `liblink-grammar4-dev` is necessary – Wazy Sep 10 '14 at 12:00
2

You first need to install the liblink-grammar4 library:

If you're on ubuntu system, you can run:

sudo apt-add-repository ppa:python-pylinkgrammar/getsome
sudo apt-get install liblink-grammar4

If you're on a different flavor of linux, just make sure liblink-grammar4 is installed.

John Brodie
  • 5,909
  • 1
  • 19
  • 29
  • right, because it's looking for a header file that exists in the debian package. Install that using the commands in my answer, and then retry pip installing. – John Brodie Feb 02 '13 at 06:25
  • 1
    yeah did both sudo apt-add-repository ppa:python-pylinkgrammar/getsome sudo apt-get install liblink-grammar4 still same error gcc – LO_pz Feb 02 '13 at 06:42
0

This might be helpful

sudo apt-get install liblink-grammar4-dev cmake swig
sudo pip install pylinkgrammar
Asad
  • 2,782
  • 2
  • 16
  • 17