On Jun 16, 11:07 am, "James Matthews" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am trying to import a library that is in a non-standard location ~/opt/lib
> (I am in a shared environment) and i added it to my "LD_LIBRARY_PATH"
> however Django tells me it cannot find it and me a 500 error.
>
> In python i can import the library but not in Django. I compiled this
> library using Swig.
>
> Details:
>
> Error was: libhdate.so.1: cannot open shared object file: No such file or
> directory
>
> but in python...
> [machine]$ python -c "from hdate import Hdate"
> [machine]$
>

Clearly it's a different sys.path in the two pythons.
Assert yourself first that you're using the exact same python binary
for django and for python on the command line.
Try this:
$ python
>>> import hdate
>>> import sys
>>> from pprint import pprint
>>> pprint(sys.path)

Then try it from the django shell
$ python manage.py shell
>>> import hdate
... ImportError ...
>>> import sys
>>> from pprint import pprint
>>> pprint(sys.path)

Then compare and find out what's going on.



> Any help?
>
> James
>
> --http://search.goldwatches.com/?Search=Movado+Watcheshttp://www.jewelerslounge.comhttp://www.goldwatches.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to