Seaborn in sage

91 views
Skip to first unread message

Laurent Decreusefond

unread,
Jul 23, 2016, 3:17:26 PM7/23/16
to sage-support
I recently discovered Seaborn, which is a visualization library on top
of matplotlib. It doesn't seem to be included in sage 7.2. Is there any
projet to do so ? or is there something equivalent ?

Best,

Andrey Novoseltsev

unread,
Jul 24, 2016, 1:31:06 PM7/24/16
to sage-support
While it is not included, you can install it yourself via pip (SageMathCell does it):

sage -pip install seaborn

Laurent Decreusefond

unread,
Jul 27, 2016, 3:57:37 AM7/27/16
to sage-support
Thanks. I tried to do it in the command line on a fresh install of Sage 7.2 and I got this error message (the full log is attached) :

[snip]

    In file included from /Users/Laurent/Downloads/sage-7.2/local/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.9-x86_64.egg/numpy/core/include/numpy/ndarraytypes.h:1777:0,

                     from /Users/Laurent/Downloads/sage-7.2/local/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.9-x86_64.egg/numpy/core/include/numpy/ndarrayobject.h:18,

                     from /Users/Laurent/Downloads/sage-7.2/local/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.9-x86_64.egg/numpy/core/include/numpy/arrayobject.h:4,

                     from pandas/src/datetime/np_datetime.c:18:

    /Users/Laurent/Downloads/sage-7.2/local/lib/python2.7/site-packages/numpy-1.11.0-py2.7-macosx-10.9-x86_64.egg/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]

     #warning "Using deprecated NumPy API, disable it by " \

      ^

    /var/folders/md/71gv03bs6mx4qxg933r_k_x40000gn/T//ccSLsnmg.s:984:suffix or operands invalid for `movq'

    /var/folders/md/71gv03bs6mx4qxg933r_k_x40000gn/T//ccSLsnmg.s:2605:suffix or operands invalid for `movq'

    /var/folders/md/71gv03bs6mx4qxg933r_k_x40000gn/T//ccSLsnmg.s:4735:suffix or operands invalid for `movq'

    error: command 'gcc' failed with exit status 1

error.log

Dima Pasechnik

unread,
Jul 27, 2016, 4:30:47 AM7/27/16
to sage-support
errors like you get:

/var/folders/md/71gv03bs6mx4qxg933r_k_x40000gn/T//ccSLsnmg.s:984:suffix or operands invalid for `movq'

indicate that your Sage's compiler toolchain is broken in some way, probably incompatible with your hardware.
A way to fix this would be to build Sage from source.

Nathan Dunfield

unread,
Jul 27, 2016, 1:44:23 PM7/27/16
to sage-support
On Wednesday, July 27, 2016 at 3:30:47 AM UTC-5, Dima Pasechnik wrote:
errors like you get:

/var/folders/md/71gv03bs6mx4qxg933r_k_x40000gn/T//ccSLsnmg.s:984:suffix or operands invalid for `movq'

indicate that your Sage's compiler toolchain is broken in some way, probably incompatible with your hardware.
A way to fix this would be to build Sage from source.

I believe this issue is likely the same as:


As Dima says, building all of Sage from source will fix this.  An quicker solution might be to make sure you installed the version of Sage from 


whose label matches your version of OS X.  

Best,

Nathan

leif

unread,
Jul 27, 2016, 1:45:55 PM7/27/16
to sage-s...@googlegroups.com
Dima Pasechnik wrote:
> errors like you get:
>
>
> /var/folders/md/71gv03bs6mx4qxg933r_k_x40000gn/T//ccSLsnmg.s:984:suffix or operands invalid for `movq'
>
>
> indicate that your Sage's compiler toolchain is broken in some way,
> probably incompatible with your hardware.
> A way to fix this would be to build Sage from source.

Nope, it's Apple's dead old version of the GNU assembler.

(Newer Xcode versions by default use the one from LLVM, but require
newer versions of MacOS X as well.)

If one passes '-q' to the assembler, clang's/LLVM's will get used
instead, so you could try adding '-Wa,-q' to CFLAGS and CXXFLAGS in
order to let GCC pass '-q' to the assembler, by doing for example

$ env CFLAGS="-Wa,-q" CXXFLAGS="-Wa,-q" ./sage -i <package>


Another way is to create a wrapper script $SAGE_LOCAL/bin/as which calls
the assembler with '-q' added to the options; see the following trac
tickets for more details:

https://trac.sagemath.org/ticket/20779

https://trac.sagemath.org/ticket/20563 (same issue, i.e. with movq)

(Both a bit stalled at the moment, but give more info on the general
problem with Xcode versions < 7.0.)


-leif

leif

unread,
Jul 27, 2016, 2:34:45 PM7/27/16
to sage-s...@googlegroups.com
Nathan Dunfield wrote:
> On Wednesday, July 27, 2016 at 3:30:47 AM UTC-5, Dima Pasechnik wrote:
>
> errors like you get:
>
>
> /var/folders/md/71gv03bs6mx4qxg933r_k_x40000gn/T//ccSLsnmg.s:984:suffix or operands invalid for `movq'
>
>
> indicate that your Sage's compiler toolchain is broken in some way,
> probably incompatible with your hardware.
> A way to fix this would be to build Sage from source.
>
>
> I believe this issue is likely the same as:
>
> https://trac.sagemath.org/ticket/20563
>
> As Dima says, building all of Sage from source will fix this.

Ok, I didn't get he was using a binary distribution of Sage.

Building from source (or perhaps just reinstalling the GCC package by
typing 'make gcc') should work /in this case/, but doing so only fixes
the problem with movd vs. movq.

(The suggestion in my other reply should still work as well, I think.)


> A quicker solution might be to make sure you installed the version of Sage
> from
>
> http://mirrors.mit.edu/sage/osx/intel/index.html
>
> whose label matches your version of OS X.

Yep, there meanwhile is one specifically for MacOS X 10.9.


-leif


Laurent Decreusefond

unread,
Jul 27, 2016, 2:46:40 PM7/27/16
to sage-support
I will try this one since I'm already working on a fresh, compiled from source, version of Sage.

Laurent Decreusefond

unread,
Jul 27, 2016, 3:35:51 PM7/27/16
to sage-support
Thanks to your remarks, I realized that I had an old beta-version of Xcode (7.1) which was in conflict with the actual version (7.3.1). I relaunched the install with the correct version of Xcode and everything went smoothly. Thanks for your answers. 

leif

unread,
Jul 27, 2016, 3:44:40 PM7/27/16
to sage-s...@googlegroups.com
Laurent Decreusefond wrote:
> I will try this one since I'm already working on a fresh, compiled from
> source, version of Sage.

If you have Sage's GCC built on *your* system, the issue with movq will
disappear (since GCC checks exactly that feature of the assembler at its
*build* time).

But you /may/ run into similar problems ("No such instruction: ...")
when for example building NTL, since Apple's old GAS doesn't support
AVX, BMI etc. Then you can try what I suggested, or see #20779 (and
#21064 especially for NTL).


-leif


> Le mercredi 27 juillet 2016 19:45:55 UTC+2, leif a écrit :
>
> Dima Pasechnik wrote:
> > errors like you get:
> >
> >
> >
> /var/folders/md/71gv03bs6mx4qxg933r_k_x40000gn/T//ccSLsnmg.s:984:suffix
> or operands invalid for `movq'
> >
> >
> > indicate that your Sage's compiler toolchain is broken in some way,
> > probably incompatible with your hardware.
> > A way to fix this would be to build Sage from source.
>
> Nope, it's Apple's dead old version of the GNU assembler.
>
> (Newer Xcode versions by default use the one from LLVM, but require
> newer versions of MacOS X as well.)
>
> If one passes '-q' to the assembler, clang's/LLVM's will get used
> instead, so you could try adding '-Wa,-q' to CFLAGS and CXXFLAGS in
> order to let GCC pass '-q' to the assembler, by doing for example
>
> $ env CFLAGS="-Wa,-q" CXXFLAGS="-Wa,-q" ./sage -i <package>
>
>
> Another way is to create a wrapper script $SAGE_LOCAL/bin/as which
> calls
> the assembler with '-q' added to the options; see the following trac
> tickets for more details:
>
> https://trac.sagemath.org/ticket/20779
> <https://trac.sagemath.org/ticket/20779>
>
> https://trac.sagemath.org/ticket/20563

leif

unread,
Jul 27, 2016, 4:08:55 PM7/27/16
to sage-s...@googlegroups.com
Laurent Decreusefond wrote:
> Thanks to your remarks, I realized that I had an old beta-version of
> Xcode (7.1) which was in conflict with the actual version (7.3.1). I
> relaunched the install with the correct version of Xcode and everything
> went smoothly. Thanks for your answers.

Oh, interesting. (I thought you were running MacOS X 10.9.)

Which version actually is it? Yosemite (10.10) or already El Capitan
(10.11)?


-leif
> <https://trac.sagemath.org/ticket/20779>
>
> https://trac.sagemath.org/ticket/20563

Laurent Decreusefond

unread,
Jul 28, 2016, 1:18:44 AM7/28/16
to sage-support
My version is on El Capitan 10.11.6
Reply all
Reply to author
Forward
0 new messages