ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 11 Sep 2018 19:18:14 -0500Sage does not see Imagemagickhttps://ask.sagemath.org/question/43643/sage-does-not-see-imagemagick/I am trying out the animation thing in http://doc.sagemath.org/html/en/reference/plotting/sage/plot/animate.html.
But Sage keep saying
Error: Neither ImageMagick nor ffmpeg appears to be installed.
And indeed
from sage.misc.sage_ostools import have_program
have_program('convert')
returns false.
But I do have ImageMagick installed by homwbrew.
i.e. it works perfectly in Terminal.
What Could Possibly Go Wrong?
(macOS 10.13; Sage 8.3; Imagemagick 7.0.8.)Symbol 1Tue, 11 Sep 2018 19:18:14 -0500https://ask.sagemath.org/question/43643/Animated Plots Not Working on Windows 10 (Image Magick)https://ask.sagemath.org/question/42388/animated-plots-not-working-on-windows-10-image-magick/Hi,
I've looked up the following documentation:
http://doc.sagemath.org/html/en/reference/plotting/sage/plot/animate.html
and tried to use the first example after installing ImageMagick.
However when I run the script, I get nothing, and when I look in the terminal I only see "Invalid Parameter - Background Image".
I tried reinstalling ImageMagick and this time tick all the boxes, not just the default ones, and when I run the command again I get a longer message "convert.exe: unable to open image (...)", similar to what was signaled here:
https://ask.sagemath.org/question/41082/problem-imagemagick-and-animate/
I'm running SageMath8.2 on Windows 10. How can I fix this ? If the problem is that SageMath cannot find the correct paths to ImageMagick, how can I fix that ?
Thank you very much,
Turiel.
PS: I also get this message in the Notebook when I tried to run the command for the first time, it disappears when I run it again:
/opt/sagemath-8.2/local/lib/python2.7/site-packages/sage/repl/rich_output/display_manager.py:590: RichReprWarning: Exception in _rich_repr_ while displaying object:
Error: Cannot generate GIF animation. Verify that convert
(ImageMagick) or ffmpeg is installed, and that the objects passed to
the animate command can be saved in PNG image format.
See www.imagemagick.org and www.ffmpeg.org for more information.
RichReprWarning,TurielTue, 22 May 2018 06:20:59 -0500https://ask.sagemath.org/question/42388/Problem : ImageMagick and animatehttps://ask.sagemath.org/question/41082/problem-imagemagick-and-animate/Hi,
I have Sage 8.1 and ImageMagick (installed from 7.0.7-22-Q16-x64-dll.exe) installed on W10.
When I execute in Sage Notebook :
sines = [plot(c*sin(x), (-2*pi,2*pi), color=Color(c,0,0), ymin=-1, ymax=1) for c in sxrange(0,1,.2)]
a = animate(sines)
a.show()
I get this :
convert.exe: unable to open image
'/dot_sage/temp/my_desktop/17724/tmp_bfv0BC.gif': No such file or
directory @ error/blob.c/OpenBlob/3335.
Animation with 5 frames
And I have no animation.
How can I solve this ?
Thank youkrokoMon, 12 Feb 2018 16:44:56 -0600https://ask.sagemath.org/question/41082/Sage 5.1: Animate command bughttps://ask.sagemath.org/question/9150/sage-51-animate-command-bug/Hi all,
I have installed the both the app version and the command line version of the Sage 5.1 on a MacBook Pro running Lion. Also, I have installed the most recent version of ImageMagick and I've set the environment variables as suggested at the ImageMagick
website. I also checked that ImageMagick is working!
Sage's 'animate' command fails when invoking either version of Sage 5.1 from the command line and then entering "notebook" command to start the browser version of
Sage.
The example is the first one in the 'Animate Plots' section of the Sage's 'Help':
a = animate([circle((i,i), 1-1/(i+1), hue=i/10) for i in srange(0,2,0.2)],
xmin=0,ymin=0,xmax=2,ymax=2,figsize=[2,2])
a.show() # optional -- ImageMagick
Below is the error that is reported by Sage:
============================================================================
convert: memory allocation failed `00000000.png' @
error/png.c/ReadOnePNGImage/2105.
convert: corrupt image `00000000.png' @ error/png.c/ReadPNGImage/3693.
convert: memory allocation failed `00000001.png' @
error/png.c/ReadOnePNGImage/2105.
convert: corrupt image `00000001.png' @ error/png.c/ReadPNGImage/3693.
convert: memory allocation failed `00000002.png' @
error/png.c/ReadOnePNGImage/2105.
convert: corrupt image `00000002.png' @ error/png.c/ReadPNGImage/3693.
convert: memory allocation failed `00000003.png' @
error/png.c/ReadOnePNGImage/2105.
convert: corrupt image `00000003.png' @ error/png.c/ReadPNGImage/3693.
convert: memory allocation failed `00000004.png' @
error/png.c/ReadOnePNGImage/2105.
convert: corrupt image `00000004.png' @ error/png.c/ReadPNGImage/3693.
convert: memory allocation failed `00000005.png' @
error/png.c/ReadOnePNGImage/2105.
convert: corrupt image `00000005.png' @ error/png.c/ReadPNGImage/3693.
convert: memory allocation failed `00000006.png' @
error/png.c/ReadOnePNGImage/2105.
convert: corrupt image `00000006.png' @ error/png.c/ReadPNGImage/3693.
convert: memory allocation failed `00000007.png' @
error/png.c/ReadOnePNGImage/2105.
convert: corrupt image `00000007.png' @ error/png.c/ReadPNGImage/3693.
convert: memory allocation failed `00000008.png' @
error/png.c/ReadOnePNGImage/2105.
convert: corrupt image `00000008.png' @ error/png.c/ReadPNGImage/3693.
convert: memory allocation failed `00000009.png' @
error/png.c/ReadOnePNGImage/2105.
convert: corrupt image `00000009.png' @ error/png.c/ReadPNGImage/3693.
convert: no images defined
`/private/var/folders/31/r_2f8ryd5ks7xb80nyrbj2cc0000gn/T/tmpbsWwH9/sage\
0.gif' @ error/convert.c/ConvertImageCommand/3044.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_2.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("YSA9IGFuaW1hdGUoW2NpcmNsZSgoaSxpKSwgMS0xLyhpKzEpLCBodWU9aS8xMCkgZm9yIGkgaW4gc3JhbmdlKDAsMiwwLjIpXSwgCiAgICAgICAgICAgICAgIHhtaW49MCx5bWluPTAseG1heD0yLHltYXg9MixmaWdzaXplPVsyLDJdKQphLnNob3coKSAjIG9wdGlvbmFsIC0tIEltYWdlTWFnaWNr"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/private/var/folders/31/r_2f8ryd5ks7xb80nyrbj2cc0000gn/T/tmpyUOMOA/___code___.py", line 5, in <module>
exec compile(u'a.show() # optional -- ImageMagick
File "", line 1, in <module>
File "/Applications/Sage/local/lib/python2.7/site-packages/sage/plot/animate.py", line 457, in show
self.gif(delay = delay, iterations = iterations)
File "/Applications/Sage/local/lib/python2.7/site-packages/sage/plot/animate.py", line 400, in gif
raise OSError, msg
OSError:
Error: Neither ImageMagick nor ffmpeg appears to be installed. Saving an
animation to a GIF file or displaying an animation requires one of these
packages, so please install one of them and try again.
See www.imagemagick.org and www.ffmpeg.org for more information.
==================================================================================
This might be a permissions error (which causes the images not to be generated)
or perhaps a 64bit vs 32bit lib error. I am not sure!
Note that if the app version of Sage is invoked, Sage is unable to find
ImageMagick's "convert" command.
In a previous response to a similar question it was
suggested that one should modify the "environment.plist" file to set the
environment variables rather than the ".bash_profile file". However, the
problem above seems to be more serious than just finding ImageMagick.
In any case, there should be a better fix than this! An average user should
not be expected to make such changes in their systems! In future versions of
Sage could ImageMagick (or an equivalent) be bundled with Sage?
Regards,
Adam Hausknecht
Department of Mathematics
UMass Dartmouth
ahausknechtThu, 12 Jul 2012 19:17:21 -0500https://ask.sagemath.org/question/9150/imagemagick/animate problemhttps://ask.sagemath.org/question/8688/imagemagickanimate-problem/I have imagemagick installed on my OS X Snow Leopard machine. When I try to do animation on a notebook on my machine I get the error:
"/tmp/sage-mac-app/local/bin/sage-native-execute: line 8: convert:
command not found
Error: ImageMagick does not appear to be installed. Saving an
animation to a GIF file or displaying an animation requires
ImageMagick, so please install it and try again.
See www.imagemagick.org, for example."
Any idea why this would fail even though the convert command works in my terminal prompt?
*edit* I should point out that in the terminal session, the show() method does generate a gif with several pictures. In notebook, however, I get the above error.zscoolWed, 01 Feb 2012 14:38:06 -0600https://ask.sagemath.org/question/8688/How to install imagemagick on Sage4.7.2https://ask.sagemath.org/question/8803/how-to-install-imagemagick-on-sage472/I can't find instructions for installing the imagemagick or ffmpeg animition software to run animate on a local sage machine. Can someone here help me? Thanks a lot.
Carl Eberhart
Well, I downloaded the ImageMagick-6.7.6-1.i386.rpm (the download at the top of the list on
http://www.imagemagick.org/script/binary-releases.php
into a sage folder. Then I ran sage and killed the notebook. then I became an su with password sage
then I cd'd to the sage folder and followed the instructions rmp -Uvh Image....etc
Got error indicating 6 library files that couldn't be found. After playing around a bit more, I gave up.
Any suggestions? Thankscarl.eberhartMon, 19 Mar 2012 09:03:25 -0500https://ask.sagemath.org/question/8803/