Manabu Sakamoto
2012-Jan-23 13:50 UTC
[R] convert command not found in movie3d (rgl package) in Mac OS X
Dear list, I gave up trying to fix my movie3d (rgl library) issue in my PC (completely black gif/png file) and went ahead and installed MacPorts and ImageMagick onto my iMac (OSX ver 10.6.8). I think ImageMagick is successfully installed in its default location (under /opt/local), and I ran movie3d but I get the following error: Error in system("convert --version", intern = TRUE) : ? error in running command sh: convert: command not found so I'm guessing R can't find the "convert" executable file, which is in "/opt/local/bin", in its system search path, which I presume is "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin" that I got using Sys.getenv("PATH"). Does anyone know how I can resolve this? For instance, should I move or copy the convert executable file to an appropriate directory (which I don't really know where exactly, i.e. I can't find a folder "usr" in the Macintosh HD), or can I add "/opt/local/bin" to the R's search path? best regards, Manabu -- Manabu Sakamoto, PhD School of Earth Sciences University of Bristol manabu.sakamoto at gmail.com
Duncan Murdoch
2012-Jan-23 14:07 UTC
[R] convert command not found in movie3d (rgl package) in Mac OS X
On 12-01-23 8:50 AM, Manabu Sakamoto wrote:> Dear list, > > I gave up trying to fix my movie3d (rgl library) issue in my PC > (completely black gif/png file) and went ahead and installed MacPorts > and ImageMagick onto my iMac (OSX ver 10.6.8). I think ImageMagick is > successfully installed in its default location (under /opt/local), and > I ran movie3d but I get the following error: > > Error in system("convert --version", intern = TRUE) : > error in running command > sh: convert: command not found > > so I'm guessing R can't find the "convert" executable file, which is > in "/opt/local/bin", in its system search path, which I presume is > "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin" that I got using > Sys.getenv("PATH"). > > Does anyone know how I can resolve this? For instance, should I move > or copy the convert executable file to an appropriate directory (which > I don't really know where exactly, i.e. I can't find a folder "usr" in > the Macintosh HD), or can I add "/opt/local/bin" to the R's search > path?I think the latter is easiest. Just use Sys.setenv to set it, e.g. Sys.setenv(PATH=paste("/opt/local/bin", Sys.getenv("PATH"), sep=":") The setting will only last for the duration of your R session. Duncan Murdoch
David Winsemius
2015-Jun-29 00:50 UTC
[R] convert command not found in movie3d (rgl package) in Mac OS X
On Jan 23, 2012, at 5:50 AM, Manabu Sakamoto wrote:> Dear list, > > I gave up trying to fix my movie3d (rgl library) issue in my PC > (completely black gif/png file) and went ahead and installed MacPorts > and ImageMagick onto my iMac (OSX ver 10.6.8). I think ImageMagick is > successfully installed in its default location (under /opt/local),I'm not sure it has a default location, but if you are using a package management system, then there might be a default location for all the packages installed in that manner.> and > I ran movie3d but I get the following error: > > Error in system("convert --version", intern = TRUE) : > error in running command > sh: convert: command not found > > so I'm guessing R can't find the "convert" executable file, which is > in "Sys.getenv("PATH")", in its system search path, which I presume is > "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin" that I got using > Sys.getenv("PATH"). > > Does anyone know how I can resolve this? For instance, should I move > or copy the convert executable file to an appropriate directory (which > I don't really know where exactly, i.e. I can't find a folder "usr" in > the Macintosh HD),The /usr/ directory is hidden and not displayed by the default settings of the Finder.app, but you should be able to change those settings if you da a Google search and use Terminal.app to start up a bash shell or you can use Terminal.app and type these two lines: cd / ls> > or can I add "/opt/local/bin" to the R's search > path?I'm not sure whether executing: Sys.setenv("PATH") <- paste(Sys.getenv("PATH"), ":/opt/local") ... will necessarily cause success with a system()-mediated call, since my fragile understanding is that the system()-calls use the bash shell which has a different PATH variable than does R called from R.app which is what I suspect you are using. This is probably better addressed to the R-SIG-Mac mailing list and you will need to subscribe: r-sig-mac R <r-sig-mac at r-project.org>> best regards, > Manabu > > -- > Manabu Sakamoto, PhD > School of Earth Sciences > University of Bristol > manabu.sakamoto at gmail.com > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.David Winsemius Alameda, CA, USA
Reasonably Related Threads
- ImageMagick not seen by movie3d function from rgl package
- movie3d in rgl object 'movie' not found
- Problems setting language in R-2.13.0 and opening RData
- how to assess the significance of regression between a set of response and predictor variables
- movie3d function in the rgl package