Open sprague252 opened 5 years ago
These app shortcuts are not really compatible with conda's environments. I am not sure it we should really keep ones like that that cannot work very well.
I'll see what I can do about rmarkdown:::find_pandoc() not looking somewhere relative to the executable path though.
Would you mind testing the R 3.5.0 macOS packages available on rdonnellyr
please and let me know if the problem reproduces there? Thanks in advance.
No problem. I will test them and let you know.
An update to rstudio
is alsso available there, please see if that fixes this (I know if fixes another important bug I introduced to the macOS builds).
Actual Behavior
The bug is that Anaconda does not add its bin directory to the path environment variable that is read when an application is opened in the Mac OS Finder. I noticed this when I launched the RStudio application (installed by Anaconda), and RStudio could not find pandoc, which was in the Anaconda
bin
directory. I have installed Anaconda on my computer in/opt/anaconda
so it can be used by all users. The Anaconda installer modifies the user.bash_profile
file to add the appropriate bin directory (in my case/opt/anaconda/bin
) to the user path. When starting an application such as RStudio from the bash shell, thePATH
variable from the shell is passed to the application, but when the application is opened from the Finder (or the Dock), thePATH
variable is not determined from .bash_profile, and the application does not know about the Anaconda bin directory. One solution is to add an entry with the path to the Anaconda bin directory in the /etc/paths.d directory. The system reads these entries to set thePATH
variable for processes that are not started within a shell. See a discussion of this at https://apple.stackexchange.com/questions/106355/setting-the-system-wide-path-environment-variable-in-mavericks. There may be another place that Anaconda can store the path to its executable directory for Mac OS applications like RStudio, but I am not aware of it.Expected Behavior
Applications such as RStudio should be able to find the necessary executables when they are launched from the Finder.
Steps to Reproduce
anaconda/Applications/RStudio.app
.rmarkdown:::find_pandoc()
.as.list(rmarkdown:::.pandoc)
.$version
and$dir
areNULL
, then pandoc was not found.Sys.getenv("PATH")
.bin
directory is not in the path output, then RStudio cannot locate the executable files in it.Anaconda or Miniconda version:
Anaconda package version: custom, build: py27h2cfa9e9_0
Operating System:
Mac OS 10.13.6
conda info
conda list --show-channel-urls