Thank You very much Peter. However this is the output of what you told me to
do. And i don't get an import error when i try to import Hdate under the
django shell

Python 2.5.2 (r252:60911, Mar 30 2008, 02:18:56)
[GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import hdate
>>> import sys
>>> from pprint import pprint
>>> pprint(sys.path)
['',
 '/home/user/opt/lib/python2.5/site-packages/setuptools-0.6c5-py2.5.egg',
 
'/home/user/opt/lib/python2.5/site-packages/MySQL_python-1.2.2-py2.5-linux-i686.egg',
 '/home/.debase/user',
 '/home/user/opt/lib/python2.5/site-packages',
 '/home/user/django/django_src',
 '/home/user/django/django_projects',
 '/home/user/opt/lib',
 '/home/user/opt/lib/python25.zip',
 '/home/user/opt/lib/python2.5',
 '/home/user/opt/lib/python2.5/plat-linux2',
 '/home/user/opt/lib/python2.5/lib-tk',
 '/home/user/opt/lib/python2.5/lib-dynload',
 '/home/user/opt/lib/python2.5/site-packages/PIL']
>>>


On Mon, Jun 16, 2008 at 12:39 PM, Peter Bengtsson <[EMAIL PROTECTED]> wrote:

>
>
>
> 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
>
> >
>


-- 
http://search.goldwatches.com/?Search=Movado+Watches
http://www.jewelerslounge.com
http://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 django-users@googlegroups.com
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