1
votes

I was importing "from docx import Document". This gave an error

File "", line 1, in File "/usr/local/lib/python2.7/site-packages/docx.py", line 17, in from lxml import etree ImportError: /usr/local/lib/python2.7/site-packages/lxml-3.7.0-py2.7-linux-i686.egg/lxml/etree.so: undefined symbol: gcry_check_version

Same error I am getting while trying to install lxml.

Python Version: 2.7, OS: CentOS release 5.8

1
It's possible you might be missing libgcrypt. Try doing yum install libgcrypt libgcrypt-devel and try again. - zedfoxus
@zedfoxus : Running this is giving me this error : justpaste.it/11kcq - Shruti Agarwal
@zedfoxus : The error was too big to be pasted here. So I have shared the link with the error - Shruti Agarwal
Try doing yum clean all and then yum clean metadata. Then try to install libgcrypt and libgcrypt-devel. - zedfoxus
@zedfoxus : Getting a diff error now : justpaste.it/11kd1 - Shruti Agarwal

1 Answers

2
votes

Libcrypt Issue

Try:

LD_PRELOAD=/usr/lib/libgcrypt.so
export LD_PRELOAD

This should fix it