Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
387 views
in Technique[技术] by (71.8m points)

python - lxml: DLL load failed: The specified module could not be found

I have Windows Server 2008 R2 x64. It has running Python27 x86 + Django 1.3 + apache 2.2 x86 under wsgi. It runs ok without lxml.

We're using soaplib, which requires lxml. I tried installing lxml in several ways:

  1. using easy_install
  2. downloading win32 installation binary.

Problem is that running under site under apache raises following error:

ImportError at /
DLL load failed: The specified module could not be found.

It raises this error on from lxml import etree

I have googled for solution but found nothing useful. Some info I found:

  1. That there was some change in python26->python27 that changes what dlls are included
  2. I used dependency walker to find which dlls are missing. The ones I found missing are: gpsvc.dll, IEShims.dll, msvcr90.dll. When I tried installing x86 redistributable package but it didn't change anything. I tried copying msvcr90.dll to egg dir of lxml and it created another error that said it coudn't load the dll (I don't remember exact exception but I can generate it if needed)

It works when running from django internal server by running manage.py runserver

How can I resolve this issue? Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I installed unofficial builds from http://www.lfd.uci.edu/~gohlke/pythonlibs/

It solved my problem.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...