Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
709 views
in Technique[技术] by (71.8m points)

r - Cannot find 'convert' using SaveGIF function in animation package

I'm having trouble with the SaveGIF function in library (animation). The function gives me this error:

Error in cmd.fun(sprintf("%s --version", convert), intern = TRUE, ignore.stdout = !interactive(), :
unused argument(s) (ignore.stdout = !interactive())
I cannot find ImageMagick with convert = 'convert'
NULL
Warning message:
In im.convert(img.files, output = movie.name, convert = convert, :
Please install ImageMagick first or put its bin path into the system PATH variable

What confuses me is that I do have convert on my system, so I'd expect SaveGIF to be able to find it without any trouble:

me@my-laptop:~$ convert --version

Version: ImageMagick 6.5.7-8 2010-12-02 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009

How do I add convert's bin path to the system PATH variable?

Edit: I'm using Ubuntu, not Windows.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You probably did not edit your PATH variable. On Windows 7 (but will probably work on earlier versions to) go to:

start menu

Right click computer -> properties

Advanced System Settings

Environment Variables

Then under "System variables" (the lower pane) find the variable "path", select it and click edit.

You are interested in the content of Variable value (maybe copy it to a text editor to read it better). It should contain the link to imagemagick in it, seperated by semicolons from other variables. For me the path to imagemagick is:

C:Program FilesImageMagick-6.6.7-Q16

Make sure you only add it, not change anything else to the path variable. Add it with a semicolon.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...