trouble with packages

107 views
Skip to first unread message

Anne Schilling

unread,
Dec 27, 2015, 5:19:50 PM12/27/15
to sage-devel
Hi!

I upgraded to the newest development version of sage and I am now having trouble with
many of the packages I was using before (and now do not seem to work any longer).

Most importantly, the following worked for me before and now raises an error:

sage: gap=Gap3('/Applications/gap3r4p4/bin/gap')
sage: gap.RequirePackage('"specht"')
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-22-c539883f0214> in <module>()
----> 1 gap.RequirePackage('"specht"')

/Applications/sage/local/lib/python2.7/site-packages/sage/interfaces/interface.pyc in __call__(self, *args, **kwds)
    605
    606     def __call__(self, *args, **kwds):
--> 607         return self._parent.function_call(self._name, list(args), kwds)
    608
    609     def _sage_doc_(self):

/Applications/sage/local/lib/python2.7/site-packages/sage/interfaces/gap.pyc in function_call(self, function, args, kwds)
    919             self.eval(marker)
    920             res = self.eval(cmd)
--> 921         if self.eval('IsIdenticalObj(last,__SAGE_LAST__)') != 'true':
    922             return self.new('last2;')
    923         else:

/Applications/sage/local/lib/python2.7/site-packages/sage/interfaces/gap.pyc in eval(self, x, newlines, strip, split_lines, **kwds)
    567             if not input_line.endswith(';'):
    568                 input_line += ';'
--> 569         result = Expect.eval(self, input_line, **kwds)
    570         if not newlines:
    571             result = result.replace("\\\n","")

/Applications/sage/local/lib/python2.7/site-packages/sage/interfaces/expect.pyc in eval(self, code, strip, synchronize, locals, allow_use_file, split_lines, **kwds)
   1237                 elif split_lines:
   1238                     return '\n'.join([self._eval_line(L, allow_use_file=allow_use_file, **kwds)
-> 1239                                         for L in code.split('\n') if L != ''])
   1240                 else:
   1241                     return self._eval_line(code, allow_use_file=allow_use_file, **kwds)

/Applications/sage/local/lib/python2.7/site-packages/sage/interfaces/gap.pyc in _eval_line(self, line, allow_use_file, wait_for_prompt, restart_if_needed)
    765                     return ''
    766             else:
--> 767                 raise RuntimeError(message)
    768
    769         except KeyboardInterrupt:

RuntimeError: Gap3 produced error output
Error, Variable: 'IsIdenticalObj' must have a value

   executing IsIdenticalObj(last,__SAGE_LAST__);

What do I need to do?

Also, I had many other packages installed and some are not yet in the new format. How do I install them
(since I really need them)?

Thanks!

Anne

Volker Braun

unread,
Dec 27, 2015, 6:35:32 PM12/27/15
to sage-devel
Can you run gap3 on the command line?

Anne Schilling

unread,
Dec 27, 2015, 8:02:11 PM12/27/15
to sage-devel
I can run

sage: gap=Gap3('/Applications/gap3r4p4/bin/gap')
sage: gap.an_element()
2

Is that what you meant?

Anne Schilling

unread,
Dec 27, 2015, 8:25:15 PM12/27/15
to sage-devel
Also, how do I now install old packages that I still need? For example

sage -i sage-mode

does not work.

Thank you!

Anne

Francois Bissey

unread,
Dec 27, 2015, 10:08:23 PM12/27/15
to sage-...@googlegroups.com
I am guessing that the pexpect upgrade is behind this particular problem.
`sage/interface/gap.py` will probably need to be inspected for the case
of gap3.

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

Volker Braun

unread,
Dec 28, 2015, 4:15:48 AM12/28/15
to sage-devel
On Monday, December 28, 2015 at 2:25:15 AM UTC+1, Anne Schilling wrote:
sage -i sage-mode
does not work.
 
It just freezes your computer so you do not get any helpful error messages?

Anne Schilling

unread,
Dec 28, 2015, 4:43:22 PM12/28/15
to sage-devel
I do not know anything about the pexpect upgrade. Will someone be looking into this?
Which version of sage can I downgrade to to make it run again (I really need this feature).

Thanks,

Anne

Anne Schilling

unread,
Dec 28, 2015, 4:54:27 PM12/28/15
to sage-devel

Well, it says that it installed it successfully, but where? I cannot find it anywhere

anne$ sage -p sage-mode
Found package sage-mode in /Applications/sage/upstream/sage-mode-0.6.spkg
sage-mode-0.6
====================================================
Extracting package /Applications/sage/upstream/sage-mode-0.6.spkg
-rw-r--r--  1 anne  admin  259682 Mar 18  2015 /Applications/sage/upstream/sage-mode-0.6.spkg
Finished extraction
****************************************************
Host system:
Darwin lolita.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
****************************************************
C compiler: gcc
C compiler version:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/Applications/sage/local/libexec/gcc/x86_64-apple-darwin14.5.0/4.9.2/lto-wrapper
Target: x86_64-apple-darwin14.5.0
Configured with: ../src/configure --prefix=/Applications/sage/local --with-local-prefix=/Applications/sage/local --with-gmp=/Applications/sage/local --with-mpfr=/Applications/sage/local --with-mpc=/Applications/sage/local --with-system-zlib --disable-multilib --disable-nls --enable-languages=c,c++,fortran --disable-libitm --with-build-config=bootstrap-debug --without-isl --without-cloog 
Thread model: posix
gcc version 4.9.2 (GCC)
****************************************************
running build
running build_py
creating build
creating build/lib
copying xreload.py -> build/lib
copying sage_emacs.py -> build/lib
running install
running build
running build_py
running install_lib
byte-compiling /Applications/sage/local/lib/python2.7/site-packages/sage_emacs.py to sage_emacs.pyc
byte-compiling /Applications/sage/local/lib/python2.7/site-packages/xreload.py to xreload.pyc
running install_egg_info
Removing /Applications/sage/local/lib/python2.7/site-packages/sage_mode-0.1-py2.7.egg-info
Writing /Applications/sage/local/lib/python2.7/site-packages/sage_mode-0.1-py2.7.egg-info
rm: /emacs: Permission denied


A basic install might include the following Emacs Lisp in your .emacs:

(add-to-list 'load-path (expand-file-name "/emacs"))
(require 'sage "sage")
(setq sage-command "/Applications/sage/sage")

;; If you want sage-view to typeset all your output and have plot()
;; commands inline, uncomment the following line and configure sage-view:
;; (require 'sage-view "sage-view")
;; (add-hook 'sage-startup-hook 'sage-view)
;; You can use commands like
;; (add-hook 'sage-startup-hook 'sage-view
;; 'sage-view-disable-inline-output 'sage-view-disable-inline-plots)
;; to have some combination of features.  In future, the customize interface
;; will make this simpler... hint, hint!



real    0m0.086s
user    0m0.044s
sys    0m0.038s
Successfully installed sage-mode-0.6
Deleting temporary build directory
/Applications/sage/local/var/tmp/sage/build/sage-mode-0.6
Finished installing sage-mode-0.6.spkg

Warning: it might be needed to update the Sage library before
installed packages work: you should run 'make' from $SAGE_ROOT
before running Sage.


Before it was in `/Applications/sage/local/share/emacs/site-lisp/sage-mode`, but that is gone!

Thanks,

Anne

Volker Braun

unread,
Dec 28, 2015, 6:13:55 PM12/28/15
to sage-devel
On Monday, December 28, 2015 at 10:54:27 PM UTC+1, Anne Schilling wrote:
byte-compiling /Applications/sage/local/lib/python2.7/site-packages/sage_emacs.py to sage_emacs.pyc
byte-compiling /Applications/sage/local/lib/python2.7/site-packages/xreload.py to xreload.pyc
running install_egg_info
Removing /Applications/sage/local/lib/python2.7/site-packages/sage_mode-0.1-py2.7.egg-info
Writing /Applications/sage/local/lib/python2.7/site-packages/sage_mode-0.1-py2.7.egg-info
rm: /emacs: Permission denied

Looks like thats the issue


Do you have SAGE_MODE environment variable set?  Output of 

env | grep SAGE_DATA



Volker Braun

unread,
Dec 28, 2015, 6:34:51 PM12/28/15
to sage-devel
On Monday, December 28, 2015 at 10:43:22 PM UTC+1, Anne Schilling wrote:
I do not know anything about the pexpect upgrade. Will someone be looking into this?
Which version of sage can I downgrade to to make it run again (I really need this feature).

6.10.beta6 or earlier

Anne Schilling

unread,
Dec 28, 2015, 10:01:51 PM12/28/15
to sage-devel


I guess not. The output to this is empty for me.

Emmanuel Charpentier

unread,
Dec 31, 2015, 5:26:29 AM12/31/15
to sage-devel
Dear Anne,


Le lundi 28 décembre 2015 02:25:15 UTC+1, Anne Schilling a écrit :
Also, how do I now install old packages that I still need? For example

sage -i sage-mode

does not work.

May I inquire why you want to use sage-mode (0.6) rather than sage_mode (0.14) ?

The only striking difference I found betweeen those two is that the "old'" sage-mode pasted .pngs in the emacs buffer, whereas the current sage_mode invokes the local viewer (yes, that's inconvenient, but it seems to be an unescapable consequence of the "rich output" format). Maybe we should bug Ivan Andrus to get this feature back ?

I am still a big fan of sage_mode for some uses, but find myself more and more using the Jupyter notebook. And, anyway, when I converge to something communicable, my work usually ends up in a .tex file with a proeminent \usepackage{sagetex}...

HTH,

--
Emmanuel Charpentier
 

Volker Braun

unread,
Dec 31, 2015, 6:11:44 AM12/31/15
to sage-devel
On Thursday, December 31, 2015 at 11:26:29 AM UTC+1, Emmanuel Charpentier wrote:
May I inquire why you want to use sage-mode (0.6) rather than sage_mode (0.14) ?

Nobody wants the ancient sage-mode, its just that an easy-to-make typo installs a broken package which nobody wants. Its a totally unnecessary trap.


Reply all
Reply to author
Forward
0 new messages