[SciPy-User] ubuntu's PYTHONPATH and installing scipy

Charles R Harris charlesr.harris@gmail....
Wed Dec 9 01:06:30 CST 2009


On Tue, Dec 8, 2009 at 6:31 PM, Darren Dale <dsdale24@gmail.com> wrote:

> On Tue, Dec 8, 2009 at 7:10 PM, John Schulman <joschu@caltech.edu> wrote:
> > Hi,
> > There's an issue with ubuntu PYTHONPATH that causes problems for scipy
> > installation. I eventually found a workaround, but I want to point out
> > the problem.
> >
> > PYTHONPATH is different when sudoing, so that packages installed by
> > aptitute appear first in the path.*
> >
> > The svn version scipy imports numpy in the setup script. "python
> > setup.py build" works as it should, but then "sudo python setup.py
> > install" gives the error "ImportError: cannot import name get_info",
> > since it's trying to use numpy1.3 (which was a dependency for some
> > package I installed).
> >
> > The workaround is simple:
> > sudo PYTHONPATH=/usr/local/lib/python2.6/dist-packages: python setup.py
> install
> >
> > *In ubuntu, packages that you install through the apt package manager
> > goes into /usr/lib/python2.6/dist-packages, but python setup.py
> > install puts stuff in /usr/local/lib/python2.6/dist-packages. There's
> > a line in /etc/profile (I didn't put it there--it must be Ubuntu):
> > export PYTHONPATH=/usr/local/lib/python2.6/dist-packages:$PYTHONPATH.
> > I guess this is a kludge to fix the problem.
>
> You can also use visudo to edit your sudo options, so that your
> PYTHONPATH is carried over.
>
>
Oh, that's too clever. I used locate to find all the numpy installations and
deleted those with the wrong date ;) There are actually *three* different
directories in which python stuff gets installed. I haven't a clue why.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20091209/7d465143/attachment.html 


More information about the SciPy-User mailing list