Crystals not displaying

248 views
Skip to first unread message

Julie Beier

unread,
May 29, 2017, 4:48:45 PM5/29/17
to sage-support
I have been trying to use the tableaux crystal pictures in Sage and, while it works on the cloud, it does not work on my computer.  I have updated Sage (then reverted to the version of Sage used on the cloud), updated on my LaTeX packages, and installed dot2tex.  The code I'm using is from the help pages: B = crystals.Tableaux(['A',2], shape=[2,1]); view(B, tightpage=True).  The Tex files generated by the cloud and by my computer are different.  The one generated by the cloud compiles, but the one from my computer does not.  I've attached these.  Any ideas?  Thanks for your help!
FromMyComputer.tex
FromCloud.tex

Dima Pasechnik

unread,
May 31, 2017, 2:38:29 AM5/31/17
to sage-support, coc...@googlegroups.com
Perhaps SMC people can explain where the discrepancy in the TeX output comes from.
I cc to the relevant group.

Dima Pasechnik

unread,
May 31, 2017, 2:43:13 AM5/31/17
to sage-support, coc...@googlegroups.com, Sage Combinat Devel
I can confirm that 
B = crystals.Tableaux(['A',2], shape=[2,1]); view(B, tightpage=True) 
does not work with the latest Sage beta. 
It looks as if some tikz-related stuff in the TeX file header
is messed up.

Dima Pasechnik

unread,
May 31, 2017, 6:02:35 AM5/31/17
to CoCalc, sage-s...@googlegroups.com, sage-comb...@googlegroups.com


On Wednesday, May 31, 2017 at 7:43:14 AM UTC+1, Dima Pasechnik wrote:
I can confirm that 
B = crystals.Tableaux(['A',2], shape=[2,1]); view(B, tightpage=True) 
does not work with the latest Sage beta. 
It looks as if some tikz-related stuff in the TeX file header
is messed up.

oops, it does work after I install dot2tex by doing

sage -i dot2tex

So perhaps the only issue is that without it it should signal a more meaningful error...

Harald Schilly

unread,
May 31, 2017, 6:06:47 AM5/31/17
to Dima Pasechnik, CoCalc, sage-s...@googlegroups.com, sage-comb...@googlegroups.com
On Wed, May 31, 2017 at 12:02 PM, Dima Pasechnik <dim...@gmail.com> wrote:
> oops, it does work after I install dot2tex by doing
>
> sage -i dot2tex

Well, I can only confirm, that dot2tex is installed on CoCalc...

Better error messages and sanity checks FTW :-)

-- harald

Nicolas M. Thiery

unread,
May 31, 2017, 9:24:55 AM5/31/17
to sage-comb...@googlegroups.com, sage-support, coc...@googlegroups.com
Hi,

I am investigating this. Current status:

Remember that graphs can be latex rendered in two ways: either by
having Sage produce tikz manually (1), or through dot2tex (2). For
general graphs, the former is the default. For graphs produced from
crystals, the default is to use (2) if dot2tex is installed, and (1)
otherwise. At the end the issue is not in dot2tex: its presence just
hides the bug.

Here is my current minimal example, which breaks independently of
dot2tex:

sage: t = StandardTableaux(4).random_element()
sage: G = DiGraph([[t,t]], loops=True)
sage: latex(G)
**produces something**
sage: view(G)
**boom**
> --
> You received this message because you are subscribed to the Google
> Groups "sage-combinat-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [1]sage-combinat-d...@googlegroups.com.
> To post to this group, send email to
> [2]sage-comb...@googlegroups.com.
> Visit this group at
> [3]https://groups.google.com/group/sage-combinat-devel.
> For more options, visit [4]https://groups.google.com/d/optout.
>
> References
>
> 1. mailto:sage-combinat-d...@googlegroups.com
> 2. mailto:sage-comb...@googlegroups.com
> 3. https://groups.google.com/group/sage-combinat-devel
> 4. https://groups.google.com/d/optout

Nicolas
--
Nicolas M. Thiéry "Isil" <nth...@users.sf.net>
http://Nicolas.Thiery.name/

Nicolas M. Thiery

unread,
May 31, 2017, 10:30:13 AM5/31/17
to sage-comb...@googlegroups.com, sage-support, coc...@googlegroups.com

Update:

- Up to trivial comments, the default latex output has not changed
since Sage 6.7beta3 (at least). view fails similarly with that
version.

- A slightly smaller example:

sage: t = Partition([1])
sage: G = DiGraph([[t,t]], loops=True)
sage: latex(G)
\begin{tikzpicture}
\definecolor{cv0}{rgb}{0.0,0.0,0.0}
\definecolor{cfv0}{rgb}{1.0,1.0,1.0}
\definecolor{clv0}{rgb}{0.0,0.0,0.0}
\definecolor{cv0v0}{rgb}{0.0,0.0,0.0}
%
\Vertex[style={minimum size=1.0cm,draw=cv0,fill=cfv0,text=clv0,shape=circle},LabelOut=false,L=\hbox{${\def\lr#1{\multicolumn{1}{|@{\hspace{.6ex}}c@{\hspace{.6ex}}|}{\raisebox{-.3ex}{$#1$}}}
\raisebox{-.6ex}{$\begin{array}[b]{*{1}c}\cline{1-1}
\lr{\phantom{x}}\\\cline{1-1}
\end{array}$}
}$},x=2.5cm,y=2.5cm]{v0}
%
\Loop[dist=3.0cm,dir=NO,style={color=cv0v0,},](v0)
%
\end{tikzpicture}
sage: view(G)
**boom**

So I suspect that either that error went undetected for a long time,
or it comes from a change in tikz which makes the above code more
fragile.

Anyone a suggestion on how to tweak the above output to make it robust?

Cheers,
Nicolas
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-d...@googlegroups.com.
> To post to this group, send email to sage-comb...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-combinat-devel.
> For more options, visit https://groups.google.com/d/optout.

Dima Pasechnik

unread,
Jun 1, 2017, 2:50:02 AM6/1/17
to sage-support, Sage Combinat Devel
This was also reported here:

How about we at least open a trac ticket to deal with this?


On Monday, May 29, 2017 at 9:48:45 PM UTC+1, Julie Beier wrote:

Dima Pasechnik

unread,
Jun 1, 2017, 3:02:19 AM6/1/17
to sage-support, sage-comb...@googlegroups.com, coc...@googlegroups.com, Nicolas...@u-psud.fr


On Wednesday, May 31, 2017 at 2:24:55 PM UTC+1, Nicolas M. Thiéry wrote:
       Hi,

I am investigating this. Current status:

Remember that graphs can be latex rendered in two ways: either by
having Sage produce tikz manually (1), or through dot2tex (2). For
general graphs, the former is the default. For graphs produced from
crystals, the default is to use (2) if dot2tex is installed, and (1)
otherwise. At the end the issue is not in dot2tex: its presence just
hides the bug.

Here is my current minimal example, which breaks independently of
dot2tex:

        sage: t = StandardTableaux(4).random_element()
        sage: G = DiGraph([[t,t]], loops=True)
        sage: latex(G)
        **produces something**
        sage: view(G)
        **boom**

How does one switch to using dot2tex for this example, too?

By the way, this example does work on SMC, so they must be doing something non-standard here.
What is that?
 

On Tue, May 30, 2017 at 11:43:13PM -0700, Dima Pasechnik wrote:
>    I can confirm that
>    B = crystals.Tableaux(['A',2], shape=[2,1]); view(B, tightpage=True)
>    does not work with the latest Sage beta.
>    It looks as if some tikz-related stuff in the TeX file header
>    is messed up.
>    On Wednesday, May 31, 2017 at 7:38:29 AM UTC+1, Dima Pasechnik wrote:
>
>    Perhaps SMC people can explain where the discrepancy in the TeX output
>    comes from.
>    I cc to the relevant group.
>    On Monday, May 29, 2017 at 9:48:45 PM UTC+1, Julie Beier wrote:
>
>    I have been trying to use the tableaux crystal pictures in Sage and,
>    while it works on the cloud, it does not work on my computer.  I have
>    updated Sage (then reverted to the version of Sage used on the cloud),
>    updated on my LaTeX packages, and installed dot2tex.  The code I'm
>    using is from the help pages: B = crystals.Tableaux(['A',2],
>    shape=[2,1]); view(B, tightpage=True).  The Tex files generated by the
>    cloud and by my computer are different.  The one generated by the cloud
>    compiles, but the one from my computer does not.  I've attached these.
>     Any ideas?  Thanks for your help!
>
>    --
>    You received this message because you are subscribed to the Google
>    Groups "sage-combinat-devel" group.
>    To unsubscribe from this group and stop receiving emails from it, send
>    To post to this group, send email to
>    [2]sage-comb...@googlegroups.com.
>    Visit this group at
>    [3]https://groups.google.com/group/sage-combinat-devel.
>    For more options, visit [4]https://groups.google.com/d/optout.
>
> References
>

Harald Schilly

unread,
Jun 1, 2017, 8:46:54 AM6/1/17
to Dima Pasechnik, sage-support, sage-comb...@googlegroups.com, CoCalc, Nicolas M. Thiery
On Thu, Jun 1, 2017 at 9:02 AM, Dima Pasechnik <dim...@gmail.com> wrote:
> By the way, this example does work on SMC, so they must be doing something
> non-standard here.
> What is that?

Hi, you need to be more precise, since CoCalc has a rather large
feature surface. In case you mean "sagews" files, they have nothing to
do with "sagemath", except that they use it as a back-end.

-- harald

Dima Pasechnik

unread,
Jun 1, 2017, 8:59:55 AM6/1/17
to Harald Schilly, sage-support, Sage Combinat Devel, CoCalc, Nicolas M. Thiery
right, sorry, I mean a sagews notebook running Sage.
I did not try other SMC Sage interfaces.

>
> -- harald

Harald Schilly

unread,
Jun 1, 2017, 9:07:27 AM6/1/17
to Dima Pasechnik, sage-support, Sage Combinat Devel, CoCalc, Nicolas M. Thiery
On Thu, Jun 1, 2017 at 2:59 PM, Dima Pasechnik <dim...@gmail.com> wrote:
> right, sorry, I mean a sagews notebook running Sage.
> I did not try other SMC Sage interfaces.

Yes, there is probably somewhere this "show" function involved, which
has the same name but a different implementation -- please don't ask
me about any details, I'm just pretty sure that this is what's going
on here :-)

-- harald

Dima Pasechnik

unread,
Jun 1, 2017, 9:25:19 AM6/1/17
to Harald Schilly, sage-support, Sage Combinat Devel, CoCalc, Nicolas M. Thiery
Right, it is in fact invoking show(), which is

File: /projects/sage/sage-7.5/local/lib/python2.7/site-packages/smc_sagews/sage_salvus.py
Source:
def show(*objs, **kwds):
"""
Show a 2d or 3d graphics object (or objects), animation, or
matplotlib figure, or show an
expression typeset nicely using LaTeX.

Nicolas M. Thiery

unread,
Jun 1, 2017, 2:01:14 PM6/1/17
to sage-comb...@googlegroups.com, sage-support, coc...@googlegroups.com
On Thu, Jun 01, 2017 at 12:02:19AM -0700, Dima Pasechnik wrote:
> How does one switch to using dot2tex for this example, too?

sage: t = StandardTableaux(4).random_element()
sage: G = DiGraph([[t,t]], loops=True)
sage: G.set_latex_options(format="dot2tex") # <======
sage: view(G)

Cheers,

Julie Beier

unread,
Jun 1, 2017, 2:23:29 PM6/1/17
to sage-support, sage-comb...@googlegroups.com, coc...@googlegroups.com, Nicolas...@u-psud.fr
All,

Thanks all for the help; glad to know it wasn't just something trivial that I missed.

This work around doesn't seem to work for whole crystals as there is no set_latex_options option.  Anyway to work around the problem there?

Best,

Julie

Dima Pasechnik

unread,
Jun 1, 2017, 2:40:04 PM6/1/17
to sage-support, sage-comb...@googlegroups.com, coc...@googlegroups.com


On Thursday, June 1, 2017 at 7:23:29 PM UTC+1, Julie Beier wrote:
All,

Thanks all for the help; glad to know it wasn't just something trivial that I missed.

This work around doesn't seem to work for whole crystals as there is no set_latex_options option.  Anyway to work around the problem there?

IMHO you should check if you indeed had installed dot2tex package, for the crystals.* example you posted as not
working, works for me after   I installed dot2tex (you might have to quit and start your Sage session, at least, after the
installation)

Julie Beier

unread,
Jun 1, 2017, 2:57:22 PM6/1/17
to sage-support, sage-comb...@googlegroups.com, coc...@googlegroups.com
Dima,

Sorry but I'm not sure I understand.  I followed the directions in the sage help that say to do sage -i 'dot2tex'.  That is done.  But it still creates the different tex files, and I still have the problem.  Nicolas's work around makes the small example he posted work, but it doesn't work for the crystals.  Was I supposed to install dot2tex differently?

J

Dima Pasechnik

unread,
Jun 1, 2017, 3:18:04 PM6/1/17
to sage-support, sage-comb...@googlegroups.com, coc...@googlegroups.com


On Thursday, June 1, 2017 at 7:57:22 PM UTC+1, Julie Beier wrote:
Dima,

Sorry but I'm not sure I understand.  I followed the directions in the sage help that say to do sage -i 'dot2tex'.  That is done.  But it still creates the different tex files, and I still have the problem.

the following works for me on a local Sage install (it's 8.0.beta8, but it should not matter)

sage: is_package_installed("dot2tex") # sanity check
True
sage: B = crystals.Tableaux(['A',2], shape=[2,1])
sage: view(B) # opens a tab in the browser with the picture


 
 Nicolas's work around makes the small example he posted work, but it doesn't work for the crystals.  Was I supposed to install dot2tex differently?
you can have more than one Sage install (well, in principle, that is)
(Or indeed Sage version matters...)

Julie Beier

unread,
Jun 1, 2017, 3:34:55 PM6/1/17
to sage-support, sage-comb...@googlegroups.com, coc...@googlegroups.com
So I guess this was the point of my message.  What you just posted does not work for me.  It says True for dot2tex installed, but I get the two different tex files (doing this on my computer versus on the cloud) and on my computer it does not generate something that works.  

Dima Pasechnik

unread,
Jun 1, 2017, 4:49:57 PM6/1/17
to sage-support, sage-comb...@googlegroups.com, coc...@googlegroups.com


On Thursday, June 1, 2017 at 8:34:55 PM UTC+1, Julie Beier wrote:
So I guess this was the point of my message.  What you just posted does not work for me.  It says True for dot2tex installed, but I get the two different tex files (doing this on my computer versus on the cloud) and on my computer it does not generate something that works.  

We need more details about your computer: Sage version, operating system, whether it was compiled from source or installed as a binary, what version of TeX is installed.

Julie Beier

unread,
Jun 1, 2017, 8:16:19 PM6/1/17
to sage-support, sage-comb...@googlegroups.com, coc...@googlegroups.com
Current version of SAGE: 7.5.1 though this happened with several versions, all binary install
Operating System: OSX 10.11.6
Version of Tex: Version 3.14159265-2.6-1.40.17 (TeX Live 2016); All packages up to date

As previously mentioned, this was all what matches on the cloud for SAGE and Tex.

Dima Pasechnik

unread,
Jun 2, 2017, 4:55:42 AM6/2/17
to sage-support, sage-comb...@googlegroups.com, coc...@googlegroups.com


On Friday, June 2, 2017 at 1:16:19 AM UTC+1, Julie Beier wrote:
Current version of SAGE: 7.5.1 though this happened with several versions, all binary install
Operating System: OSX 10.11.6
Version of Tex: Version 3.14159265-2.6-1.40.17 (TeX Live 2016); All packages up to date

As previously mentioned, this was all what matches on the cloud for SAGE and Tex.

Thanks, I guess I know where the problem is - it is in Sagenb;
one more piece of the puzzle: how do you start and run Sage?
Possibilities are: 

Terminal  : should work (works for me)
OSX app : I don't know
Sagenb (the "classical" Sage notebook) : displaying this does not work for me, and most probably won't be fixed
jupyter notebook : should work (works for me)

Thus, I am able to get an error if I try your code in Sagenb (although the error looks different...)

One option   for you would be switching to jupyter notebook, but for this you probably needed
a newer version of Sage.
The other option would be to run the Sage in OSX terminal - then the output should get displayed in a tab of your default browser.
Could you try the latter?
(if this still fails, to be sure it's not OSX app problem, could you install a non-app version - i.e. the filename should not end with .app.dmg, but just with 64.dmg)









Could you please try this with non-app version of Sage, and run Sage in terminal.

Julie Beier

unread,
Jun 2, 2017, 4:01:08 PM6/2/17
to sage-support, sage-comb...@googlegroups.com, coc...@googlegroups.com
Hi Dima,

I get errors when I do this in Sagenb (which is my usual place) and when I run it in Terminal.  (I've always installed the .dmg and not the .app version.)  The errors are slightly different but both have to do with an inability to compile the tex code.  This is why I am so confused.  I don't really understand why the tex code should be different when all the builds are the same. 

I'll note that I know others who have run into this problem (I've had this problem since I updated SAGE in 2013) and they have just given up.

Thanks,
Julie

Dima Pasechnik

unread,
Jun 2, 2017, 4:59:39 PM6/2/17
to sage-support, sage-comb...@googlegroups.com, coc...@googlegroups.com


On Friday, June 2, 2017 at 9:01:08 PM UTC+1, Julie Beier wrote:
Hi Dima,

I get errors when I do this in Sagenb (which is my usual place) and when I run it in Terminal.  (I've always installed the .dmg and not the .app version.)  The errors are slightly different but both have to do with an inability to compile the tex code.  This is why I am so confused.  I don't really understand why the tex code should be different when all the builds are the same. 

OSX has its own unique ways to torture developers (and they keep "improving" them :-)),
that's why it seems that Sage suffers from lack of testing on OSX...


Could you check if

sage: import dot2tex

works?

And one more sanity check:

sage: from sage.graphs.dot2tex_utils import have_dot2tex
sage: have_dot2tex()

Does this return True? (have_dot2tex() is some old function still used in that code...)



With sagenb it's not working, and will not work; sagenb is deprecated---switch to jupyter notebooks
(one advantage is that they can be used on SMC)

Julie Beier

unread,
Jun 2, 2017, 6:41:50 PM6/2/17
to sage-support, sage-comb...@googlegroups.com, coc...@googlegroups.com
This returns false.

Dima Pasechnik

unread,
Jun 3, 2017, 3:16:02 AM6/3/17
to sage-support
OK, this explains the problem: dot2tex package has not been properly installed.

Could you run

sage -b

and then try the latter checks again?

Thanks.

Dima Pasechnik

unread,
Jun 3, 2017, 4:02:19 AM6/3/17
to sage-support, sage-comb...@googlegroups.com, coc...@googlegroups.com
also, could you please post here the logfile of dot2tex installation:
it is  SAGEROOT/logs/pkgs/dot2tex-2.9.0.p1.log

Julie Beier

unread,
Jun 3, 2017, 9:55:49 AM6/3/17
to sage-support
Ok... So when I did sage -b I got a fatal error; here's the end that lists the error part: 

In file included from /Applications/SageMath/local/lib/gcc/x86_64-apple-darwin15.6.0/5.4.0/include-fixed/syslimits.h:7:0,

                 from /Applications/SageMath/local/lib/gcc/x86_64-apple-darwin15.6.0/5.4.0/include-fixed/limits.h:34,

                 from /Applications/SageMath/local/include/python2.7/Python.h:1,

                 from /Applications/SageMath/src/build/cythonized/sage/algebras/quatalg/quaternion_algebra_element.cpp:60:

/Applications/SageMath/local/lib/gcc/x86_64-apple-darwin15.6.0/5.4.0/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory

compilation terminated.

[  2/450] creating build/temp.macosx-10.9-x86_64-2.7/Applications/SageMath/src/build/cythonized/sage/algebras/letterplace

gcc -fno-strict-aliasing -I/Applications/SageMath/local/var/tmp/sage/build/python2-2.7.13.p0/include -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -I/Applications/SageMath/local/include -I/Applications/SageMath/local/include/python2.7 -I/Applications/SageMath/local/lib/python2.7/site-packages/numpy/core/include -I/Applications/SageMath/src -I/Applications/SageMath/src/sage/ext -I/Applications/SageMath/src/build/cythonized -I/Applications/SageMath/src/build/cythonized/sage/ext -I/Applications/SageMath/local/include/python2.7 -c /Applications/SageMath/src/build/cythonized/sage/algebras/letterplace/free_algebra_element_letterplace.cpp -o build/temp.macosx-10.9-x86_64-2.7/Applications/SageMath/src/build/cythonized/sage/algebras/letterplace/free_algebra_element_letterplace.o -I/Applications/SageMath/local/include/singular -I/Applications/SageMath/local/include/ -I/Applications/SageMath/local/include -DSING_NDEBUG -DOM_NDEBUG -fno-strict-aliasing

error: command 'gcc' failed with exit status 1

In file included from /Applications/SageMath/local/lib/gcc/x86_64-apple-darwin15.6.0/5.4.0/include-fixed/syslimits.h:7:0,

                 from /Applications/SageMath/local/lib/gcc/x86_64-apple-darwin15.6.0/5.4.0/include-fixed/limits.h:34,

                 from /Applications/SageMath/local/include/python2.7/Python.h:1,

                 from /Applications/SageMath/src/build/cythonized/sage/algebras/letterplace/free_algebra_element_letterplace.cpp:69:

/Applications/SageMath/local/lib/gcc/x86_64-apple-darwin15.6.0/5.4.0/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory

compilation terminated.

make: *** [sage] Error 1



The checks still show false.  Here's the dot2tex installation log:

Found local metadata for dot2tex-2.9.0.p1
Attempting to download package dot2tex-2.9.0.tar.gz from mirrors
Downloading the Sage mirror list
Searching fastest mirror
[......................................................................]
dot2tex-2.9.0.p1
====================================================
Setting up build directory for dot2tex-2.9.0.p1
Finished extraction
Applying patches from ../patches...
Applying ../patches/remove_test_semicolon.patch
patching file tests/test_dot2tex.py
****************************************************
Host system:
Darwin ec112.ec26.earlham.edu 15.6.0 Darwin Kernel Version 15.6.0: Wed Nov  2 20:30:56 PDT 2016; root:xnu-3248.60.11.1.2~2/RELEASE_X86_64 x86_64
****************************************************
C compiler: gcc
C compiler version:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/Applications/SageMath/local/libexec/gcc/x86_64-apple-darwin15.6.0/5.4.0/lto-wrapper
Target: x86_64-apple-darwin15.6.0
Configured with: ../src/configure --prefix=/Applications/SageMath/local --with-local-prefix=/Applications/SageMath/local --with-gmp=/Applications/SageMath/local --with-mpfr=/Applications/SageMath/local --with-mpc=/Applications/SageMath/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 5.4.0 (GCC) 
****************************************************
Installing package dot2tex using pip
Processing /Applications/SageMath/local/var/tmp/sage/build/dot2tex-2.9.0.p1/src
  Running setup.py (path:/var/folders/ys/v5hlv3pd7g7_605k791qvd7m0000gp/T/pip-AHL1N2-build/setup.py) egg_info for package from file:///Applications/SageMath/local/var/tmp/sage/build/dot2tex-2.9.0.p1/src
    Running command python setup.py egg_info
    running egg_info
    creating pip-egg-info/dot2tex.egg-info
    writing requirements to pip-egg-info/dot2tex.egg-info/requires.txt
    writing pip-egg-info/dot2tex.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/dot2tex.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/dot2tex.egg-info/dependency_links.txt
    writing entry points to pip-egg-info/dot2tex.egg-info/entry_points.txt
    writing manifest file 'pip-egg-info/dot2tex.egg-info/SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'pip-egg-info/dot2tex.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    no previously-included directories found matching 'tests/testgraphs/*/*.dot'
    warning: no files found matching 'tests/test_comparedotparsing.py'
    warning: no files found matching 'tests/test_multirender.py'
    warning: no files found matching 'tests/test_buildexamples.py'
    no previously-included directories found matching 'examples/*dot2tex-fig*'
    no previously-included directories found matching 'docs/_build'
    writing manifest file 'pip-egg-info/dot2tex.egg-info/SOURCES.txt'
  Source in /var/folders/ys/v5hlv3pd7g7_605k791qvd7m0000gp/T/pip-AHL1N2-build has version 2.9.0, which satisfies requirement dot2tex==2.9.0 from file:///Applications/SageMath/local/var/tmp/sage/build/dot2tex-2.9.0.p1/src
Installing collected packages: dot2tex
  Running setup.py install for dot2tex: started
    Running command /Applications/SageMath/local/bin/python -u -c "import setuptools, tokenize;__file__='/var/folders/ys/v5hlv3pd7g7_605k791qvd7m0000gp/T/pip-AHL1N2-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/ys/v5hlv3pd7g7_605k791qvd7m0000gp/T/pip-lnn0oo-record/install-record.txt --single-version-externally-managed --compile
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/dot2tex
    copying dot2tex/__init__.py -> build/lib/dot2tex
    copying dot2tex/dot2tex.py -> build/lib/dot2tex
    copying dot2tex/dotparsing.py -> build/lib/dot2tex
    running build_scripts
    creating build/scripts-2.7
    copying and adjusting dot2tex/dot2tex -> build/scripts-2.7
    changing mode of build/scripts-2.7/dot2tex from 644 to 755
    running install_lib
    creating /Applications/SageMath/local/lib/python2.7/site-packages/dot2tex
    copying build/lib/dot2tex/__init__.py -> /Applications/SageMath/local/lib/python2.7/site-packages/dot2tex
    copying build/lib/dot2tex/dot2tex.py -> /Applications/SageMath/local/lib/python2.7/site-packages/dot2tex
    copying build/lib/dot2tex/dotparsing.py -> /Applications/SageMath/local/lib/python2.7/site-packages/dot2tex
    byte-compiling /Applications/SageMath/local/lib/python2.7/site-packages/dot2tex/__init__.py to __init__.pyc
    byte-compiling /Applications/SageMath/local/lib/python2.7/site-packages/dot2tex/dot2tex.py to dot2tex.pyc
    byte-compiling /Applications/SageMath/local/lib/python2.7/site-packages/dot2tex/dotparsing.py to dotparsing.pyc
    running install_egg_info
    running egg_info
    writing requirements to dot2tex.egg-info/requires.txt
    writing dot2tex.egg-info/PKG-INFO
    writing top-level names to dot2tex.egg-info/top_level.txt
    writing dependency_links to dot2tex.egg-info/dependency_links.txt
    writing entry points to dot2tex.egg-info/entry_points.txt
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'dot2tex.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
    no previously-included directories found matching 'tests/testgraphs/*/*.dot'
    warning: no files found matching 'tests/test_comparedotparsing.py'
    warning: no files found matching 'tests/test_multirender.py'
    warning: no files found matching 'tests/test_buildexamples.py'
    no previously-included directories found matching 'examples/*dot2tex-fig*'
    no previously-included directories found matching 'docs/_build'
    writing manifest file 'dot2tex.egg-info/SOURCES.txt'
    Copying dot2tex.egg-info to /Applications/SageMath/local/lib/python2.7/site-packages/dot2tex-2.9.0-py2.7.egg-info
    running install_scripts
    copying build/scripts-2.7/dot2tex -> /Applications/SageMath/local/bin
    changing mode of /Applications/SageMath/local/bin/dot2tex to 755
    Installing dot2tex script to /Applications/SageMath/local/bin
    writing list of installed files to '/var/folders/ys/v5hlv3pd7g7_605k791qvd7m0000gp/T/pip-lnn0oo-record/install-record.txt'
    Running setup.py install for dot2tex: finished with status 'done'
  Removing source in /var/folders/ys/v5hlv3pd7g7_605k791qvd7m0000gp/T/pip-AHL1N2-build
Successfully installed dot2tex-2.9.0
Cleaning up...

real 0m2.014s
user 0m1.493s
sys 0m0.465s
Successfully installed dot2tex-2.9.0.p1
Deleting temporary build directory
/Applications/SageMath/local/var/tmp/sage/build/dot2tex-2.9.0.p1
Finished installing dot2tex-2.9.0.p1.spkg

Dima Pasechnik

unread,
Jun 3, 2017, 4:27:40 PM6/3/17
to sage-support


On Saturday, June 3, 2017 at 2:55:49 PM UTC+1, Julie Beier wrote:
Ok... So when I did sage -b I got a fatal error; here's the end that lists the error part: 

In file included from /Applications/SageMath/local/lib/gcc/x86_64-apple-darwin15.6.0/5.4.0/include-fixed/syslimits.h:7:0,

                 from /Applications/SageMath/local/lib/gcc/x86_64-apple-darwin15.6.0/5.4.0/include-fixed/limits.h:34,

                 from /Applications/SageMath/local/include/python2.7/Python.h:1,

                 from /Applications/SageMath/src/build/cythonized/sage/algebras/quatalg/quaternion_algebra_element.cpp:60:

/Applications/SageMath/local/lib/gcc/x86_64-apple-darwin15.6.0/5.4.0/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory

compilation terminated.

[  2/450] creating build/temp.macosx-10.9-x86_64-2.7/Applications/SageMath/src/build/cythonized/sage/algebras/letterplace

gcc -fno-strict-aliasing -I/Applications/SageMath/local/var/tmp/sage/build/python2-2.7.13.p0/include -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -I/Applications/SageMath/local/include -I/Applications/SageMath/local/include/python2.7 -I/Applications/SageMath/local/lib/python2.7/site-packages/numpy/core/include -I/Applications/SageMath/src -I/Applications/SageMath/src/sage/ext -I/Applications/SageMath/src/build/cythonized -I/Applications/SageMath/src/build/cythonized/sage/ext -I/Applications/SageMath/local/include/python2.7 -c /Applications/SageMath/src/build/cythonized/sage/algebras/letterplace/free_algebra_element_letterplace.cpp -o build/temp.macosx-10.9-x86_64-2.7/Applications/SageMath/src/build/cythonized/sage/algebras/letterplace/free_algebra_element_letterplace.o -I/Applications/SageMath/local/include/singular -I/Applications/SageMath/local/include/ -I/Applications/SageMath/local/include -DSING_NDEBUG -DOM_NDEBUG -fno-strict-aliasing

error: command 'gcc' failed with exit status 1

In file included from /Applications/SageMath/local/lib/gcc/x86_64-apple-darwin15.6.0/5.4.0/include-fixed/syslimits.h:7:0,

                 from /Applications/SageMath/local/lib/gcc/x86_64-apple-darwin15.6.0/5.4.0/include-fixed/limits.h:34,

                 from /Applications/SageMath/local/include/python2.7/Python.h:1,

                 from /Applications/SageMath/src/build/cythonized/sage/algebras/letterplace/free_algebra_element_letterplace.cpp:69:

/Applications/SageMath/local/lib/gcc/x86_64-apple-darwin15.6.0/5.4.0/include-fixed/limits.h:168:61: fatal error: limits.h: No such file or directory

compilation terminated.

make: *** [sage] Error 1


OK, this means that this binary installation of sage cannot properly install some, if not all, optional packages.
(and "sage -b" might have broken sage installation, so that you might need to reinstall)  
 
The usual advice applies: build your sage from source...




The checks still show false.

Do you mean that

sage: have_dot2tex()

returns False, right?

How about 

sage: import dot2tex

Does this work?


 Here's the dot2tex installation log:

Thanks. There are some warnings there that perhaps explain what exactly goes wrong, 
I am not sure.

TLDR: sage thinks that the package is installed, based on values in some configuration files.
But in fact it is broken.

By the way, I have also noticed that many doctests for dot2tex also require graphviz, for a reason I don't understand.

Julie Beier

unread,
Jun 3, 2017, 5:44:41 PM6/3/17
to sage-support
Hi Dima,

Thanks; I guess I just have to install from source.. I don't really know what to do differently than what I've already done so I feel like I basically just have to give up on it again.  But thanks so much for all your help.

Julie
This returns false.

J

On Thursday, June 1, 2017 at 2:40:04 PM UTC-4, Dima Pasechnik wrote:<blockquote class="gmail_quote" style="margin:0;

Dima Pasechnik

unread,
Jun 4, 2017, 5:58:59 AM6/4/17
to sage-support
Please see
for another way to install dot2tex.
Could you please do an experiment:
on a fresh binary installation of sage on OSX, do, as in the link above

sage -pip install dot2tex

and see if you get working crystals.* latex/view this way.
Reply all
Reply to author
Forward
0 new messages