1

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

19
  • It's possible you might be missing libgcrypt. Try doing yum install libgcrypt libgcrypt-devel and try again. Commented Dec 20, 2016 at 5:35
  • @zedfoxus : Running this is giving me this error : justpaste.it/11kcq Commented Dec 20, 2016 at 5:41
  • @zedfoxus : The error was too big to be pasted here. So I have shared the link with the error Commented Dec 20, 2016 at 5:41
  • Try doing yum clean all and then yum clean metadata. Then try to install libgcrypt and libgcrypt-devel. Commented Dec 20, 2016 at 5:46
  • @zedfoxus : Getting a diff error now : justpaste.it/11kd1 Commented Dec 20, 2016 at 5:49

1 Answer 1

2

Libcrypt Issue

Try:

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

This should fix it

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.