[sage-support] Re: Error when trying to use sage server

2011-11-22 Thread Jason
I opened the synaptic package manager in ubuntu, did a repository
refresh, and then searched for gfortran. I installed the multilib and
it seems to be working (the apt-get command didn't work).

The server_pool thing sounds like a nice feature, but I probably won't
use it until I encounter issues. I only have a few people using the
server right now but more could use it in the future.

Thanks for the help.

On Nov 21, 11:34 pm, William Stein  wrote:
> On Mon, Nov 21, 2011 at 4:51 PM, Jason  wrote:
> > It looks like even when not using the notebook, I can't even import
> > numpy. All I did was uncompress the lzma download and put it in my
> > home directory. I don't see any caveats in the readme:
> >http://boxen.math.washington.edu/sage/linux/32bit/README.txt
>
> > So two questions: is server_pool needed
>
> No, it is not needed, but it is safer if you plan to have many users
> of your server, especially users you do not trust.
> To figure out what is wrong, you need to type:
>
>   "sage -sh"
>
> on the command line, then type the thing from the error message, which
> may be this:
>
>    sage-native-execute ssh -t sage1@localhost
> "/home/engineer/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-i686-Linux/sage
> -python"
>
> This can't possibly work if you have not created an account called
> "sage1" and set up password login from your normal account
> to sage1@localhost using ssh keys.    Setting that up involves using
> the command "ssh-keygen -t rsa -b 1024" and editing the file
> $HOME/.ssh/authorized_keys in the sage1 account.
>
> > and what's wrong with my installation.
>
> Evidently (based on the error message), you need to install gfortran.
> Do something like
>
>   sudo apt-get install gfortran
>
>
>
>
>
>
>
>
>
>
>
> > sage: import numpy as np
> > ---
> > ImportError                               Traceback (most recent call
> > last)
>
> > /home/engineer/Desktop/ in ()
>
> > /home/engineer/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-i686-Linux/
> > local/lib/python2.6/site-packages/numpy/__init__.pyc in ()
> >    134         return loader(*packages, **options)
> >    135
> > --> 136     import add_newdocs
> >    137     __all__ = ['add_newdocs']
> >    138
>
> > /home/engineer/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-i686-Linux/
> > local/lib/python2.6/site-packages/numpy/add_newdocs.py in ()
> >      7 #       core/fromnumeric.py, core/defmatrix.py up-to-date.
> >      8
> > > 9 from numpy.lib import add_newdoc
> >     10
> >     11
> > ###
>
> > /home/engineer/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-i686-Linux/
> > local/lib/python2.6/site-packages/numpy/lib/__init__.py in ()
> >     11
> >     12 import scimath as emath
> > ---> 13 from polynomial import *
> >     14 #import convertcode
> >     15 from utils import *
>
> > /home/engineer/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-i686-Linux/
> > local/lib/python2.6/site-packages/numpy/lib/polynomial.py in
> > ()
> >     15 from numpy.lib.function_base import trim_zeros, sort_complex
> >     16 from numpy.lib.type_check import iscomplex, real, imag
> > ---> 17 from numpy.linalg import eigvals, lstsq
> >     18
> >     19 class RankWarning(UserWarning):
>
> > /home/engineer/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-i686-Linux/
> > local/lib/python2.6/site-packages/numpy/linalg/__init__.py in
> > ()
> >     46 from info import __doc__
> >     47
> > ---> 48 from linalg import *
> >     49
> >     50 from numpy.testing import Tester
>
> > /home/engineer/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-i686-Linux/
> > local/lib/python2.6/site-packages/numpy/linalg/linalg.py in ()
> >     21         isfinite, size, finfo, absolute, log, exp
> >     22 from numpy.lib import triu
> > ---> 23 from numpy.linalg import lapack_lite
> >     24 from numpy.matrixlib.defmatrix import matrix_power
> >     25 from numpy.compat import asbytes
>
> > ImportError: libgfortran.so.3: cannot open shared object file: No such
> > file or directory
> > sage:
>
> > On Nov 21, 2:41 pm, Jason  wrote:
> >> Thanks! I was able to import and use a worksheet by removing the
> >> server_pool option. However, the documentation here says that it
> >> specifies that worksheet processes run as separate users, not that
> >> there are multiple 
> >> servers:http://www.sagemath.org/doc/reference/sagenb/notebook/notebook_object...
>
> >> Another problem I'm having is that if I try to run anything beyond
> >> basic python, for example, if I type "import numpy as np" I get the
> >> error:
> >> Traceback (click to the left of this block for traceback)
> >> ...
> >> AttributeError: 'module' object has no attribute 'core'
>
> >> On Nov 21, 2:26 pm, Renan Birck Pinheiro 
> >> wrote:
>
> >> > 2011/11/21 Jason 
>
> >> > > I did a fresh install of Ubuntu 10.04, and placed the precompiled sage
> >> > > 4.7.2 folder in my home folder.
>
> >> > > I run sage in a terminal then u

[sage-support] Creating a callable matrix with functions.

2011-11-22 Thread Jaasiel Ornelas
Hi!

I'm trying to get a matrix over SR to be callable, much like vectors
are. My code consists of the following:

"
(theta,beta,gamma)=var('theta,beta,gamma')
R_theta=matrix(SR,[[cos(theta),sin(theta),0],[-sin(theta),cos(theta),
0],[0,0,1]])
R_beta=matrix(SR,3,3,[cos(beta),0,-sin(beta),0,1,0,sin(beta),
0,cos(beta)])
"

Defining the matrices with a place for the variables yields an error
with mutiplication:

"
R_theta(theta)=matrix(SR,[[cos(theta),sin(theta),0],[-
sin(theta),cos(theta),0],[0,0,1]])
R_beta(beta)=matrix(SR,3,3,[cos(beta),0,-sin(beta),0,1,0,sin(beta),
0,cos(beta)])

R_theta*T_beta

Traceback (most recent call last):
  File "", line 1, in 
  File "_sage_input_89.py", line 10, in 
exec compile(u'open("___code___.py","w").write("# -*- coding:
utf-8 -*-\\n" +
_support_.preparse_worksheet_cell(base64.b64decode("Ul90aGV0YSpSX2JldGE="),globals())
+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in 

  File "/private/var/folders/bM/bMOEaVgXE3CHfi1Ua6UdbTI/-Tmp-/
tmpNfeDiM/___code___.py", line 2, in 
exec compile(u'R_theta*R_beta
  File "", line 1, in 

  File "element.pyx", line 1459, in
sage.structure.element.RingElement.__mul__ (sage/structure/element.c:
12096)
  File "coerce.pyx", line 714, in
sage.structure.coerce.CoercionModel_cache_maps.bin_op (sage/structure/
coerce.c:6436)
  File "element.pyx", line 1454, in
sage.structure.element.RingElement.__mul__ (sage/structure/element.c:
12005)
  File "expression.pyx", line 2216, in
sage.symbolic.expression.Expression._mul_ (sage/symbolic/
expression.cpp:11504)
ArithmeticError: Number_T::hash() python function (__hash__) raised
exception
"

In either case, I can't get sage to substitue the variable in the
matrix. (I can define the variables before defining the matrix, but
that is redundant) Any ideas?

Thanks a lot!

Thanks a lot!

-- 
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
URL: http://www.sagemath.org


Re: [sage-support] Re: Installing latest sage

2011-11-22 Thread Renan Birck Pinheiro
2011/11/22 Eric Kangas 

> it is interesting I had to compile from source on my tablet, but on my
> desktop I didn't have to compile from source just had to install the
> package.
>
>
Probably because the tablet uses another CPU which don't has the processor
instructions required for the binary build of Sage.

-- 
Renan Birck Pinheiro - Grupo de Microeletrônica
- Engenharia
Elétrica /UFSM 

http://renanbirck.blogspot.com / skype: renan.ee.ufsm

-- 
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
URL: http://www.sagemath.org


[sage-support] Re: Installing latest sage

2011-11-22 Thread Eric Kangas
it is interesting I had to compile from source on my tablet, but on my
desktop I didn't have to compile from source just had to install the
package.

On Nov 21, 11:39 pm, William Stein  wrote:
> On Mon, Nov 21, 2011 at 3:51 PM, Eric Kangas  wrote:
> > I tried installing sage on my Toshiba Portege M200 tablet. I am using
> > ubuntu 10.10. Here is the error message I am receiving:
>
> > **
> > WARNING!  This Sage install was built on a machine that supports
> > instructions that are not available on this computer.  Sage will
> > likely fail with ILLEGAL INSTRUCTION errors! The following processor
> > flags were on the build machine but are not on this computer:
>
> > pni
>
> > Emailhttp://groups.google.com/group/sage-supportfor help.
> > To remove this warning and make Sage start, just delete
> >     /home/nooniensoong97/programs/sage-4.7.2-linux-32bit-
> > ubuntu_10.04_lts-i686-Linux/local/lib/sage-flags.txt
> > **
>
> > Even after deleting the flag the installation fails.
>
> That's because of exactly what the error message says.
>
> Your options:
>
>   (1) Build Sage from source, which you get here [1], and install via
> the instructions near the bottom of that page.
>
>   (2) Try forcing a rebuild from source of the atlas and mpir package.
>  Sometimes that is enough.
>
>     ./sage -f atlas mpir
>
> [1]http://sagemath.org/download-source.html
>
> > Here is that
> > error message:
>
> > The Sage installation tree may have moved
> > (from /home/wstein/build/sage-4.7.2 to /home/nooniensoong97/programs/
> > sage-4.7.2-linux-32bit-ubuntu_10.04_lts-i686-Linux).
> > Changing various hardcoded paths...
> > (Please wait at most a few minutes.)
> > DO NOT INTERRUPT THIS.
> > Done resetting paths.
> > /home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
> > i686-Linux/local/lib/libcsage.so(print_backtrace+0x3b)[0x4f230e]
> > /home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
> > i686-Linux/local/lib/libcsage.so(sigdie+0x17)[0x4f234e]
> > /home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
> > i686-Linux/local/lib/libcsage.so(sage_signal_handler+0x1ad)[0x4f1e70]
> > [0x751400]
> > /home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
> > i686-Linux/local/lib/python2.6/site-packages/sage/rings/
> > integer.so(initinteger+0x29aa)[0x813c9a]
> > /home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
> > i686-Linux/local/lib/libpython2.6.so.1.0(_PyImport_LoadDynamicModule
> > +0xb6)[0xa093a6]
> > /home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
> > i686-Linux/local/lib/libpython2.6.so.1.0(+0xe2f78)[0xa06f78]
> > /home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
> > i686-Linux/local/lib/libpython2.6.so.1.0(+0xe391f)[0xa0791f]
> > /home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
> > i686-Linux/local/lib/libpython2.6.so.1.0(+0xe3c1c)[0xa07c1c]
> > /home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
> > i686-Linux/local/lib/libpython2.6.so.1.0(+0xe4296)[0xa08296]
> > /home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
> > i686-Linux/local/lib/libpython2.6.so.1.0(PyImport_ImportModuleLevel
> > +0x3b)[0xa087cb]
> > /home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
> > i686-Linux/local/lib/libpython2.6.so.1.0(+0xc7916)[0x9eb916]
> > /home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
> > i686-Linux/local/lib/libpython2.6.so.1.0(PyCFunction_Call+0x128)
> > [0x991c48]
> > /home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
> > i686-Linux/local/lib/libpython2.6.so.1.0(PyObject_Call+0x5c)[0x94e73c]
> > /home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
> > i686-Linux/local/lib/libpython2.6.so.1.0(PyObject_CallFunction+0x65)
> > [0x951115]
> > /home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
> > i686-Linux/local/lib/libpython2.6.so.1.0(PyImport_Import+0xb7)
> > [0xa088e7]
> > /home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
> > i686-Linux/local/lib/python2.6/site-packages/sage/rings/
> > complex_double.so(+0xc3e4)[0x57b3e4]
> > /home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
> > i686-Linux/local/lib/python2.6/site-packages/sage/rings/
> > complex_double.so(initcomplex_double+0x18dc)[0x5878fc]
> > /home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
> > i686-Linux/local/lib/libpython2.6.so.1.0(_PyImport_LoadDynamicModule
> > +0xb6)[0xa093a6]
> > /home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
> > i686-Linux/local/lib/libpython2.6.so.1.0(+0xe2f78)[0xa06f78]
> > /home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
> > i686-Linux/local/lib/libpython2.6.so.1.0(+0xe391f)[0xa0791f]
> > /home/nooniensoong97/programs