On Jun 8, 1:57 pm, Mats <[EMAIL PROTECTED]> wrote:
> Hello,

Hi,

> I just installed a package using easy_install. I can import said
> package in a python interactive shell, but I cannot import the package
> in sage. Closer inspection reveals that:
>
> import sys
> print sys.path # <-- FYI, sys.path is different in sage than in python
> interpreter

Yes, sys.path is different, but that is to be expected:

[EMAIL PROTECTED]:/scratch/mabshoff/release-cycle/sage-3.0.3.alpha2$ ./
sage
----------------------------------------------------------------------
| SAGE Version 3.0.3.alpha1, Release Date: 2008-06-04                |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------

sage: import sys
sage: print sys.path
['/scratch/mabshoff/release-cycle/sage-3.0.3.alpha2/local/lib/
python2.5/site-packages/sympy/plotting', '/scratch/mabshoff/release-
cycle/sage-3.0.3.alpha2/local/lib/python2.5/site-packages/sympy/
thirdparty/pyglet', '', '/scratch/mabshoff/release-cycle/
sage-3.0.3.alpha2/local/bin', '/scratch/mabshoff/release-cycle/
sage-3.0.3.alpha2/local/lib/python2.5/site-packages/setuptools-0.6c8-
py2.5.egg', '/scratch/mabshoff/release-cycle/sage-3.0.3.alpha2/local/
lib/python2.5/site-packages/SQLAlchemy-0.4.3-py2.5.egg', '/scratch/
mabshoff/release-cycle/sage-3.0.3.alpha2/local/bin', '/scratch/
mabshoff/release-cycle/sage-3.0.3.alpha2/local/lib/python', '/scratch/
mabshoff/release-cycle/sage-3.0.3.alpha2/local/lib/python25.zip', '/
scratch/mabshoff/release-cycle/sage-3.0.3.alpha2/local/lib/python2.5/
plat-linux2', '/scratch/mabshoff/release-cycle/sage-3.0.3.alpha2/local/
lib/python2.5/lib-tk', '/scratch/mabshoff/release-cycle/
sage-3.0.3.alpha2/local/lib/python2.5/lib-dynload', '/scratch/mabshoff/
release-cycle/sage-3.0.3.alpha2/local/lib/python2.5/site-packages', '/
scratch/mabshoff/release-cycle/sage-3.0.3.alpha2/local/lib/python2.5/
site-packages/IPython/Extensions', '/home/mabshoff/.sage/ipython']
sage:
Exiting SAGE (CPU time 0m0.02s, Wall time 0m21.58s).
[EMAIL PROTECTED]:/scratch/mabshoff/release-cycle/sage-3.0.3.alpha2$ ./
sage -python
Python 2.5.2 (r252:60911, Jun  4 2008, 15:41:24)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.path
['', '/scratch/mabshoff/release-cycle/sage-3.0.3.alpha2/local/lib/
python2.5/site-packages/setuptools-0.6c8-py2.5.egg', '/scratch/
mabshoff/release-cycle/sage-3.0.3.alpha2/local/lib/python2.5/site-
packages/SQLAlchemy-0.4.3-py2.5.egg', '/scratch/mabshoff/release-cycle/
sage-3.0.3.alpha2', '/scratch/mabshoff/release-cycle/sage-3.0.3.alpha2/
local/lib/python', '/scratch/mabshoff/release-cycle/sage-3.0.3.alpha2/
local/lib/python25.zip', '/scratch/mabshoff/release-cycle/
sage-3.0.3.alpha2/local/lib/python2.5', '/scratch/mabshoff/release-
cycle/sage-3.0.3.alpha2/local/lib/python2.5/plat-linux2', '/scratch/
mabshoff/release-cycle/sage-3.0.3.alpha2/local/lib/python2.5/lib-tk',
'/scratch/mabshoff/release-cycle/sage-3.0.3.alpha2/local/lib/python2.5/
lib-dynload', '/scratch/mabshoff/release-cycle/sage-3.0.3.alpha2/local/
lib/python2.5/site-packages']
>>>


> Not sure if this is a bug. I closed and reopened sage.

Could you give a concrete example what you did, i.e. which python
package you installed and how sys.path looks for you in the various
configs?

> Best wishes,
> Mats

Cheers,

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

Reply via email to