Re: [sage-support] Running Sage.app installed by another user

2014-12-09 Thread Jérôme Tremblay


> Then the chmod trick should work until we get a better fix.  
>
 
They workaround works fine. I chmoded 777 the executable 
/Applications/Sage.app/Contents/Resources/sage/sage. Thank you.
 

> exits normally, so I can’t use that.  Maybe saving the user’s answer would 
> be sufficient?  So they would only get asked once (per sage version).
>

Why not once per _location_ instead of version? The users home directory, 
their DOT_SAGE, is in their account and is persistent, while the .app 
version can change anytime between sessions. 
 

> -Ivan
>

Thanks a lot for your help,


Jerome Tremblay
LaCIM, UQAM 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Running Sage.app installed by another user

2014-12-08 Thread Jérôme Tremblay


> If they hit continue, does Sage work as expected?
>

As far as I can tell, yes. The permissions of DOT_SAGE and the notebook are 
initialized and the user is asked for a password.
 

> This was implemented in http://trac.sagemath.org/ticket/15732 because 
>> Sage needs to write to some files in .sage, I believe.  So it is really 
>> raising a better error message than before, but I don't think Sage will 
>> work if they do not have write permission *somewhere*.  Someone can 
>> elaborate if that is not quite correct.
>>
>
> They do have access in their own home directory, under ~/.sage, but not in 
> /Applications/Sage.app.
>
>
> But currently Sage checks if it has moved since last time it was run and 
> writes a file somewhere with the path.  So I think you would have to run it 
> at least once as root for that to work.  
>
> The check I added to the app was to prevent it from running on a disk 
> image which has no hope of working.  My check merely checks if the sage 
> binary is writable, so I could perhaps improve it to allow installation by 
> root.  But I’m not entirely sure how to ensure that things will work (I 
> can't test things right now).  
>
> Can I just run `sage -c 1+2` and see if it succeeds?
>

I first go to /Applications/Sage.app/Contents/Resources/sage and this is 
what I get :

imac11:sage jerome$ ./sage -c 1+1

imac11:sage jerome$ ./sage

┌┐

│ Sage Version 6.4.1, Release Date: 2014-11-23   │

│ Type "notebook()" for the browser-based notebook interface.│

│ Type "help()" for help.│

└┘

sage: 1+1

2

sage: quit

Exiting Sage (CPU time 0m0.02s, Wall time 0m3.68s).

imac11:sage jerome$ 

 

>
> Perhaps a setting in the Info.plist would allow the administrator to turn 
> off the check once they know things will work.  
>
> Any other suggestions?
>

That would be fine with me. If I could remove the password initialization 
(or randomize it) it would be even better since the machines are not 
accessible externally.
 

>
> -Ivan
>

Thank you,

Jerome Tremblay
LaCIM, UQAM 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Running Sage.app installed by another user

2014-12-05 Thread Jérôme Tremblay


On Friday, December 5, 2014 11:32:34 AM UTC-5, kcrisman wrote:
>
> When I run sage as admin, everything works fine. However, when my users 
>> try to run Sage, they get a warning that they are trying to execute Sage 
>> from a read-only filesystem.
>>
>>
> This was implemented in http://trac.sagemath.org/ticket/15732 because 
> Sage needs to write to some files in .sage, I believe.  So it is really 
> raising a better error message than before, but I don't think Sage will 
> work if they do not have write permission *somewhere*.  Someone can 
> elaborate if that is not quite correct.
>

They do have access in their own home directory, under ~/.sage, but not in 
/Applications/Sage.app.
 

>  
>
>> My question is :
>>
>> It it safe to execute Sage.app if it's installed by the admin? If so, how 
>> do I suppress the warning? If not, what can I do? I can't really start 
>> installing a the whole Sage in each of my users personal space
>>
>
> Another possibility is to use a snapshot image for each desktop or 
> something - that is what some admins I know do, though I confess I do not 
> know how that works.  Maybe your situation is not a lab.
>

I'm not sure I understand what you are suggesting here. I do have a lab, so 
it might interest me.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Running Sage.app installed by another user

2014-12-05 Thread Jérôme Tremblay
Under OSX Yosemite, I try to install Sage 6.4.1 app in the system 
applications. 

When I run sage as admin, everything works fine. However, when my users try 
to run Sage, they get a warning that they are trying to execute Sage from a 
read-only filesystem.

My question is :

It it safe to execute Sage.app if it's installed by the admin? If so, how 
do I suppress the warning? If not, what can I do? I can't really start 
installing a the whole Sage in each of my users personal space

Thank you,


Jerome Tremblay
LaCIM, UQAM

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] How do I efficiently iterate through a sparse matrix?

2013-10-10 Thread Jérôme Tremblay
How do I efficiently iterate through a sparse matrix?

SciPy has matrix.tocoo(), what's the equivalent in Sage?

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.


[sage-support] Re: GAP on OSX (sage 4.4.1)

2010-05-18 Thread Jérôme Tremblay
> Regarding worksheets, if that's the only really important config info,
> users could do
>
>  sage: notebook('/path/to/their/sage/notebook/directory')
>
> or
>
>   sage -notebook /path/to/their/sage/notebook/directory
>
> You could make a little bash script that contains the above line, but
> maybe $HOME/SageNotebook or something...

Would it be possible to do it the other way around and override GAP's
default tmp directory?

-- 
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: GAP on OSX (sage 4.4.1)

2010-05-12 Thread Jérôme Tremblay
On May 12, 3:48 pm, William Stein  wrote:
> 2010/5/12 Jérôme Tremblay :
> > I am unable to run GAP from a network account on my mac.
> > When I use a local account, everything works fine.
>
> > Can anyone help me?
>
> What happens if you do
>
>    export DOT_SAGE="/tmp/your_username"
>
> before starting Sage.  (I'm assuming you're using bash -- if not, set
> that environ variable appropriately.)

This works.

But with this, the users will not have their worksheets in their
account but on the local computer, right?

Thank you,


Jerome Tremblay
LaCIM (UQAM, Canada)

-- 
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] GAP on OSX (sage 4.4.1)

2010-05-12 Thread Jérôme Tremblay
I am unable to run GAP from a network account on my mac.

sage: gap('(1,2,3)')

raise an exception.

sage: gap_console()

gives a little more information:

Couldn't open saved workspace /Network/Servers/hostname.ca/Users/
tremblayj/.sage//gap/workspace-4762775528093915922

When I use a local account, everything works fine.

Can anyone help me?




Full session:

sage: gap('(1,2,3)')
---
TypeError Traceback (most recent call
last)

/Network/Servers/thales.math.uqam.ca/Users/tremblayj/
in ()

/Library/sage/local/lib/python2.6/site-packages/sage/interfaces/
expect.py in __call__(self, x, name)
   1030
   1031 if isinstance(x, basestring):
-> 1032 return cls(self, x, name=name)
   1033 try:
   1034 return self._coerce_from_special_method(x)

/Library/sage/local/lib/python2.6/site-packages/sage/interfaces/
expect.py in __init__(self, parent, value, is_name, name)
   1449 except (TypeError, KeyboardInterrupt,
RuntimeError, ValueError), x:
   1450 self._session_number = -1
-> 1451 raise TypeError, x
   1452 self._session_number = parent._session_number
   1453

TypeError: Unable to start gap
sage: gap_console()
Couldn't open saved workspace /Network/Servers/thales.math.uqam.ca/
Users/tremblayj/.sage//gap/workspace-4762775528093915922
sage: version()
'Sage Version 4.4.1, Release Date: 2010-05-02'
sage:

-- 
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] Multi-thread and factor(n) problems

2009-05-07 Thread Jérôme Tremblay

I have a problem using factor() in a thread. Consider the following:

sage: class FactorThread(Thread):
: def run(self):
: factor(2^50-1)
:
sage: test = FactorThread()
sage: test.start()

Exception in thread Thread-3:
Traceback (most recent call last):
  File "/Library/Sage/3.4/local/lib/python/threading.py", line 486, in
__bootstrap_inner
self.run()
  File "", line 3, in run
  File "/Library/Sage/3.4/local/lib/python2.5/site-packages/sage/rings/
arith.py", line 2027, in factor
int_=int_, debug_level=verbose, proof=proof), unit)
  File "/Library/Sage/3.4/local/lib/python2.5/site-packages/sage/rings/
arith.py", line 1849, in __factor_using_pari
prev = pari.get_debug_level()
  File "gen.pyx", line 7871, in
sage.libs.pari.gen.PariInstance.get_debug_level (sage/libs/pari/gen.c:
32133)
  File "gen.pyx", line 7859, in
sage.libs.pari.gen.PariInstance.default (sage/libs/pari/gen.c:32038)
  File "gen.pyx", line 9044, in sage.libs.pari.gen._pari_trap (sage/
libs/pari/gen.c:38611)
PariError:  (7)

There seems to be a problem using pari in a new thread.

Any suggestions?
Should I report this on SageTrac?


Jérôme Tremblay
LaCIM, Montréal, Canada

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---