[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Re: Python not finding modules

Guilherme Polo

2/13/2008 12:52:00 PM

2008/2/13, Mani Chandra <mc_i2020@yahoo.co.in>:
> Hey,
> Thanks for replying. But what about the module whose path I included manually. That didn't work too!....Is it like packages that are made for python2.4 do not work for 2.5?

Depends on the module, if they are C extensions you need to compile
for correct python version.

> Also are folders recursively included?

In the case you added this
"/usr/local/lib/python2.4/site-packages/scipy" path, but it looks like
wrong. The program will try to find a scipy package but won't find, to
this happen you would need to include
"/usr/local/lib/python2.4/site-packages/". Also, the path you add is a
"starting point" for finding packages and modules, so can consider it
recursive.

> Thanks
> Mani chandra
>
>
> --- On Wed, 13/2/08, Guilherme Polo <ggpolo@gmail.com> wrote:
>
> > From: Guilherme Polo <ggpolo@gmail.com>
> > Subject: Re: Python not finding modules
> > To: mc_i2020@yahoo.co.in, python-list@python.org
> > Date: Wednesday, 13 February, 2008, 3:56 PM
>
> > 2008/2/13, Mani Chandra <mc_i2020@yahoo.co.in>:
> > > Hey!
> > > I installed a few python modules through the
> > freebsd ports, but when I try to import them in the
> > interpreter it says "module xxx not found". This
> > seems to happen for some modules and not for the others.
> > ex:- I installed psyco and parallel python which seem to be
> > found but then scipy, PIL aren't being imported. Below
> > is my $PYTHONPATH
> > >
> > > ['',
> > '/usr/local/lib/python2.5/site-packages/setuptools-0.6c7-py2.5.egg',
> > '/usr/local/lib/python25.zip',
> > '/usr/local/lib/python2.5',
> > '/usr/local/lib/python2.5/plat-freebsd6',
> > '/usr/local/lib/python2.5/lib-tk',
> > '/usr/local/lib/python2.5/lib-dynload',
> > '/usr/local/lib/python2.5/site-packages',
> > '/usr/local/lib/python2.5/site-packages/gtk-2.0',
> > '/usr/local/lib/vtk/python',
> > '/usr/local/lib/python2.5/site-packages']
> > >
> > > The scipy libs are located at
> > "/usr/local/lib/python2.4/site-packages/scipy"
> > so I manually added this path to the PYTHONPATH but it
> > still doesn't seem to find it.
> > >
> >
> > You need to install python modules for python2.5, you
> > clearly installed for 2.4.
> >
> > > Can someone please help me out here?:)
> > >
> > > ps Also does including a directory in PYTHONPATH
> > include all of it's sub-directories too?
> > >
> > >
> > >
> > > Download prohibited? No problem. CHAT from any
> > browser, without download. Go to
> > http://in.messenger.yahoo.com/webmessenger...
> > >
> > > --
> > > http://mail.python.org/mailman/listinfo/p...
> > >
> >
> >
> > --
> > -- Guilherme H. Polo Goncalves
>
>
>
> Get your domain and website for less than Rs.100/month*. Go to http://in.business....
>


--
-- Guilherme H. Polo Goncalves