On Mar 16, 4:38 am, Ahmed Fasih <wuzzyv...@gmail.com> wrote:
> Flavio, I will defer to a more expert Sage user on importing global
> python libraries into Sage but I will offer my own experiences in
> installing libraries into Sage. Since Sage has a complete Python
> installation in it (accessible through "sage -python"), I have been
> able to install the few Python packages I needed directly into Sage
> (e.g., PyCUDA) by using "sage -python" instead of "python" in the
> installation instructions and explicitly giving the Sage root
> directory. If you give the names of the packages you're looking to use
> with Sage, I (or we) can try it on my machine.

If you want to install packages into Sage's Python run "./sage -sh"
before using the 'normal' install mechanism to install the python
package, i.e. "python setup.py install" will then install into Sage's
python.

In theory you should be able to set PYTHONPATH and pull in packages
from another Python install, but in some cases this causes trouble
when you have different API releases or a python build with different
options, etc. In general it is possible of you know what you are
doing, but there are plenty if problems you might run into.

> On Mar 16, 6:26 am, Flavio Coelho <fccoe...@gmail.com> wrote:
>
> > Hi,
>
> > I want to have sage let me import from my global python installation,
> > since I have packages installed there which are not available as sage
> > packages. Is this possible?
>
> > thanks in advance,
>
> > Flávio

Cheers,

Michael
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to