sage-python PYTHONPATH

663 views
Skip to first unread message

ggrafendorfer

unread,
Sep 30, 2009, 2:07:11 PM9/30/09
to sage-support
Hi,

I would like to import my own library (which for example resides in ~/
mytools/) to the sage-python (respectively sage) environment.

Normally (for system python) one adds '~/mytools' to the PYTHONPATH
environment variable, but for sage-python this does not work.

What's the easiest way, to make sage-python aware of this? If
possible, such that it keeps on working even after a new installation
of sage.

thanks, Georg

Burcin Erocal

unread,
Sep 30, 2009, 2:22:52 PM9/30/09
to sage-s...@googlegroups.com
Hi Georg,

Try using the SAGE_PATH variable in the same way as PYTHONPATH. You can
also try adding a line to change sys.path in your init.sage file.

Cheers,
Burcin

georg grafendorfer

unread,
Sep 30, 2009, 3:24:47 PM9/30/09
to sage-support
Thanks Burcin,

Adding the path to SAGE_PATH works fine, that's the solution I was
looking for,

Georg




On 30 Sep., 20:22, Burcin Erocal <bur...@erocal.org> wrote:
> Hi Georg,
>
> On Wed, 30 Sep 2009 11:07:11 -0700 (PDT)
>
Reply all
Reply to author
Forward
0 new messages