ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 22 Nov 2011 22:56:50 +0100trying to install dot2texhttps://ask.sagemath.org/question/8505/trying-to-install-dot2tex/In trying to view a crystal graph, I had this sequence of exchanges with SAGE
sage: B=CrystalOfTableaux(['A',2],shape=[2,1])
sage: view(B)
evaluate
dot2tex not available. Install after running 'sage -sh'
dot2tex not available. Install after running 'sage -sh'
None
sage: -sh
evaluate
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_14.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("LXNo"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmp_8N1J9/___code___.py", line 2, in <module>
exec compile(u'-sh
File "", line 1, in <module>
AttributeError: Sh instance has no attribute '__neg__'
What did I do wrong trying to run the -sh command? And after I get it to run, do I just enter -i dot2tex?
Tue, 22 Nov 2011 22:09:49 +0100https://ask.sagemath.org/question/8505/trying-to-install-dot2tex/Answer by kcrisman for <p>In trying to view a crystal graph, I had this sequence of exchanges with SAGE</p>
<pre><code>sage: B=CrystalOfTableaux(['A',2],shape=[2,1])
sage: view(B)
evaluate
dot2tex not available. Install after running 'sage -sh'
dot2tex not available. Install after running 'sage -sh'
None
sage: -sh
evaluate
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_14.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("LXNo"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmp_8N1J9/___code___.py", line 2, in <module>
exec compile(u'-sh
File "", line 1, in <module>
AttributeError: Sh instance has no attribute '__neg__'
</code></pre>
<p>What did I do wrong trying to run the -sh command? And after I get it to run, do I just enter -i dot2tex?</p>
https://ask.sagemath.org/question/8505/trying-to-install-dot2tex/?answer=12930#post-id-12930I'm not sure whether this will work per se, but `sage -sh` is referring to quitting Sage and then starting it again from the command line with the `-sh` flag.
----------
Everything after here didn't seem to work the way it should. I'm not sure what's going on. Mabe you really *do* have to install dot2tex 'manually'.
----------------------------------------------------------------------
| Sage Version 4.7.2, Release Date: 2011-10-29 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: B=CrystalOfTableaux(['A',2],shape=[2,1])
sage: view(B)
dot2tex not available. Install after running 'sage -sh'
sage:
Exiting Sage (CPU time 0m0.13s, Wall time 1m20.10s).
new-host-2:$ sage -sh
Starting subshell with Sage environment variables set.
Be sure to exit when you are done and do not do anything
with other copies of Sage!
Bypassing shell configuration files ...
SAGE_ROOT=/Users/.../sage-4.7.2
(sage subshell) new-host-2:$
So presumably then you would install it.
Except, as you point out, this is now an optional package. So I do `sage -i dot2tex`, restart, and get...
----------------------------------------------------------------------
| Sage Version 4.7.2, Release Date: 2011-10-29 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: B=CrystalOfTableaux(['A',2],shape=[2,1])
ERROR Could not locate Graphviz binaries
ERROR Failed to create xdotdata. Is Graphviz installed?
ERROR Failed to parse the input data. Is it a valid dot file?
Try to input xdot data directly. Example:
dot -Txdot file.dot | dot2tex > file.tex
If this does not work, check that you have an updated version of PyParsing and
Graphviz. Users have reported problems with old versions. You can also run
dot2tex in debug mode using the --debug option:
dot2tex --debug file.dot
A file dot2tex.log will be written to the current directory with detailed
information useful for debugging.
Huh. So your problems are probably not at an end at this point. I'm sorry I can't help further!Tue, 22 Nov 2011 22:56:50 +0100https://ask.sagemath.org/question/8505/trying-to-install-dot2tex/?answer=12930#post-id-12930