How do I get octave & PDFLatex to work for the Sage virtual machine?

115 views
Skip to first unread message

Brenton

unread,
Apr 26, 2015, 11:50:28 AM4/26/15
to sage-s...@googlegroups.com
Hi,

I am new to VirtualBox but I have Sage running running now through it but I haven't a clue how to get octave & pdflatex installed on this virtual machine. The OS of the virtual machine on which Sage is running is Ubuntu 32 bit. My PC is Windows 7 64 bit. I have Octave installed on my host OS (i.e., the Win 7 64 bit) and it is in my PATH environment variable. 

Thanks for your time,
Brenton

Vincent Delecroix

unread,
Apr 26, 2015, 11:59:29 AM4/26/15
to sage-s...@googlegroups.com
Hello,

First of all none of your windows program can be used from the virtual
machine.

To install any software inside the virtual machine:
- make internet available to the virtual machine
- use the package manager to install new packages, in your cases the
packages are: "octave" and "texlive" (look over internet on how to do or
use "apt-get install octave texlive" in a console)

Vincent

Brenton

unread,
Apr 26, 2015, 12:20:29 PM4/26/15
to sage-s...@googlegroups.com
I can't seem to open up anything but Chromium (through which I am viewing the sage notebook). How do I open up a terminal? I've tried Ctrl+Alt+T, Alt+T, Shift+Alt+T with no effect. 

Vincent Delecroix

unread,
Apr 26, 2015, 12:29:01 PM4/26/15
to sage-s...@googlegroups.com
Ho, I see. You are using the virtual box from sagemath.org. Then you can try

http://ask.sagemath.org/question/8991/sage-50-virtualbox-shell-access/

(not sure it will work though)

Brenton

unread,
Apr 26, 2015, 1:23:46 PM4/26/15
to sage-s...@googlegroups.com
I managed to install both pieces of software, although oddly now Sage notebook is having trouble starting octave & doesn't recognize that PDFLatex has been installed. I ran these commands through the terminal: 

sudo "yum install octave texlive"

as Sage 6.6 seems to run through Cent OS even though I set the OS for the virtual machine (VM) to Ubuntu (32 bit). I then closed the VM and re-opened & re-ran these commands. Attached is a screenshot showing my exact errors in sage notebook relating to PDFLatex & Octave. 
Sage-6.png

Vincent Delecroix

unread,
Apr 26, 2015, 1:35:40 PM4/26/15
to sage-s...@googlegroups.com
Could you click on the left where the error message appear and
copy/paste here the full traceback of the error.

Brenton

unread,
Apr 26, 2015, 2:01:55 PM4/26/15
to sage-s...@googlegroups.com
Here it is:

Traceback (most recent call last):
 
File "<stdin>", line 1, in <module>
 
File "_sage_input_4.py", line 10, in <module>
   
exec compile(u"print _support_.syseval(octave, u'pi', __SAGE_TMP_DIR__)" + '\n', '', 'single')
 
File "", line 1, in <module>
   
 
File "/home/sage/sage-6.6/local/lib/python2.7/site-packages/sagenb-0.11.4-py2.7.egg/sagenb/misc/support.py", line 438, in syseval
   
return system.eval(cmd, sage_globals, locals = sage_globals)
 
File "/home/sage/sage-6.6/local/lib/python2.7/site-packages/sage/interfaces/expect.py", line 1222, in eval
   
for L in code.split('\n') if L != ''])
 
File "/home/sage/sage-6.6/local/lib/python2.7/site-packages/sage/interfaces/expect.py", line 819, in _eval_line
   
self._start()
 
File "/home/sage/sage-6.6/local/lib/python2.7/site-packages/sage/interfaces/octave.py", line 285, in _start
   
Expect._start(self)
 
File "/home/sage/sage-6.6/local/lib/python2.7/site-packages/sage/interfaces/expect.py", line 448, in _start
   
raise RuntimeError("unable to start %s" % self.name())
RuntimeError: unable to start octave

Vincent Delecroix

unread,
Apr 26, 2015, 2:12:56 PM4/26/15
to sage-s...@googlegroups.com
In a sage worksheet what happens if you evaluate a cell with

octave(1)

Vincent

Brenton

unread,
Apr 26, 2015, 2:15:41 PM4/26/15
to sage-s...@googlegroups.com
Traceback (most recent call last):
 
File "<stdin>", line 1, in <module>

 
File "_sage_input_6.py", line 10, in <module>
   
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("b2N0YXZlKDEp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))

  File "", line 1, in <module>
   
  File "/tmp/tmpgJkMld/___code___.py", line 3, in <module>
    exec compile(u'
octave(_sage_const_1 )

 
File "", line 1, in <module>

   
 
File "/home/sage/sage-6.6/local/lib/python2.7/site-packages/sage/interfaces/interface.py", line 172, in __call__
   
return self._coerce_from_special_method(x)
 
File "/home/sage/sage-6.6/local/lib/python2.7/site-packages/sage/interfaces/interface.py", line 198, in _coerce_from_special_method
   
return (x.__getattribute__(s))(self)
 
File "sage/structure/sage_object.pyx", line 778, in sage.structure.sage_object.SageObject._octave_ (build/cythonized/sage/structure/sage_object.c:9047)
 
File "sage/structure/sage_object.pyx", line 593, in sage.structure.sage_object.SageObject._interface_ (build/cythonized/sage/structure/sage_object.c:5154)
 
File "/home/sage/sage-6.6/local/lib/python2.7/site-packages/sage/interfaces/interface.py", line 170, in __call__
   
return cls(self, x, name=name)
 
File "/home/sage/sage-6.6/local/lib/python2.7/site-packages/sage/interfaces/expect.py", line 1305, in __init__
   
self._name = parent._create(value, name=name)
 
File "/home/sage/sage-6.6/local/lib/python2.7/site-packages/sage/interfaces/interface.py", line 360, in _create
   
self.set(name, value)
 
File "/home/sage/sage-6.6/local/lib/python2.7/site-packages/sage/interfaces/octave.py", line 300, in set
   
out = self.eval(cmd)

 
File "/home/sage/sage-6.6/local/lib/python2.7/site-packages/sage/interfaces/expect.py", line 1222, in eval
   
for L in code.split('\n') if L != ''])
 
File "/home/sage/sage-6.6/local/lib/python2.7/site-packages/sage/interfaces/expect.py", line 819, in _eval_line
   
self._start()
 
File "/home/sage/sage-6.6/local/lib/python2.7/site-packages/sage/interfaces/octave.py", line 285, in _start
   
Expect._start(self)
 
File "/home/sage/sage-6.6/local/lib/python2.7/site-packages/sage/interfaces/expect.py", line 448, in _start
   
raise RuntimeError("unable to start %s" % self.name())
TypeError: unable to start octave

Vincent Delecroix

unread,
Apr 26, 2015, 2:17:06 PM4/26/15
to sage-s...@googlegroups.com
It seems that octave is not installed in your virtual machine. Did you
install it? If it is so, try in a console

octave --version

Vincent

Brenton

unread,
Apr 26, 2015, 2:20:47 PM4/26/15
to sage-s...@googlegroups.com
Gives
-bash: octave: command not found.

Vincent Delecroix

unread,
Apr 26, 2015, 2:26:26 PM4/26/15
to sage-s...@googlegroups.com
Then octave is not installed... how did you try to install it?

Brenton

unread,
Apr 26, 2015, 2:37:44 PM4/26/15
to sage-s...@googlegroups.com
I've tried installing it twice now. The basic procedure is I go into shell (Ctrl+F1), then login as either sage or root (1st time I used sage, 2nd as root), then run:

yum install octave texlive

clicking "Y" (for yes) when prompted. 

Brenton

unread,
Apr 26, 2015, 2:46:10 PM4/26/15
to sage-s...@googlegroups.com
I re-ran octave --version after my 2nd installation attempt and it gave the error in the attached screenshot. 


On Monday, 27 April 2015 01:50:28 UTC+10, Brenton wrote:
Sage-6.png

Vincent Delecroix

unread,
Apr 26, 2015, 2:55:12 PM4/26/15
to sage-s...@googlegroups.com
Seems to be a known issue with CentOS

https://bugzilla.redhat.com/show_bug.cgi?id=872781

but solvable though. You should have a look on google "CentOS octave".

If you do solve the issue, please post your solution here! That would be
helpful!

Vincent

Volker Braun

unread,
Apr 26, 2015, 7:35:11 PM4/26/15
to sage-s...@googlegroups.com
did you try "yum install hdf5"?

Brenton

unread,
Apr 26, 2015, 9:57:32 PM4/26/15
to sage-s...@googlegroups.com
I have now. Octave still isn't working inside Sage. 
Reply all
Reply to author
Forward
0 new messages