Thanks for your reply. How do you check env path variables diff
between shell and code
execution?

To my wsgi file, I have this line "#!/usr/local/bin/python" which
tells which interpreter to use. And yes, libxml2.py and libxml2mod.so
files are there in "/usr/local/lib/python2.5/site-packages/" folder.
Also running ldd on libxml2mod.so outputs:

libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0x00002b5368ebe000)

Also my python path looks correct. The django shell manages to find
and import the respective modules.

I have a feeling that the solution is quite easy after which I will
hit myself in the head hard! I have been pulling hair over this
problem since days now. Anyone, with any suggestions/info on how they
got their libxml2 module to work, please don't hesitate to reply.

Thanks


On Jun 2, 2:14 pm, Jeliuc Alexandr <jeliucalexa...@gmail.com> wrote:
> You should check env path variables diff  between shell and code
> execution. Another way check this error path is there libxml2 or not.
> it may be in usr/lib/python2.5. or something like that.
>
> On Jun 2, 4:57 pm, Superman <ramseydsi...@gmail.com> wrote:
>
> > I have a django site that is integrated with scrapy, but when the
> > scrapy code is called from the view, I get this error:
>
> > File "/usr/local/lib/python2.5/site-packages/libxml2.py", line 1, in
> > <module>
> >   import libxml2mod
>
> >     ImportError: /usr/local/lib/python2.5/site-packages/
> > libxml2mod.so:
> >     undefined symbol:xmlTextReaderSetup
>
> > But using the same python executable file on shell, I can import
> > libxml2 and libxml2mod fine!
>
> > >>> import libxml2mod
> > >>> import libxml2
>
> > Does anyone have an idea why my program is not working from .py file
> > as import is working perfect from python prompt.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to