OHDSI Home | Forums | Wiki | Github

Unable to install OHDSI in Mac OS Mojave


I am trying to install OHDSI in Mac OS Mojave with dart.


I recive the following errors,

Installing package into ‘/Users/u0979082/packrat/lib/x86_64-apple-darwin15.6.0/3.6.1’
(as ‘lib’ is unspecified)
Warning in install.packages :
unable to access index for repository https://OHDSI.github.io/drat/bin/macosx/el-capitan/contrib/3.6:
cannot open URL ‘https://OHDSI.github.io/drat/bin/macosx/el-capitan/contrib/3.6/PACKAGES

package ‘PatientLevelPrediction’ is available as a source package but not as a binary

Warning in install.packages :
package ‘PatientLevelPrediction’ is not available (as a binary package for R version 3.6.1)

I have R Studio : Version 1.2.5001 and R version 3.6.1.

Since this method did not work I also tried to install using devtools. However, I get the following errors when I tried to install SqlRender.

Downloading GitHub repo ohdsi/SqlRender@master
:heavy_check_mark: checking for file ‘/private/var/folders/22/pz8hk02x2hj985j4klbz5gkm0000gp/T/Rtmp6OoEMP/remotes473a48b130ca/OHDSI-SqlRender-2fc4405/DESCRIPTION’ …
Error in system2(“cp”, “–version”, stdout = TRUE, stderr = FALSE) :
error in running command
Execution halted
sh: rm: command not found
Error: Failed to install ‘SqlRender’ from GitHub:
System command error, exit status: 1, stdout + stderr:
E> * checking for file ‘/private/var/folders/22/pz8hk02x2hj985j4klbz5gkm0000gp/T/Rtmp6OoEMP/remotes473a48b130ca/OHDSI-SqlRender-2fc4405/DESCRIPTION’ … OK
E> Error in system2(“cp”, “–version”, stdout = TRUE, stderr = FALSE) :
E> error in running command
E> Execution halted
E> sh: rm: command not found

According to some forums, this is a sign that I do not have XCode. However, in my case I have XCode already installed.
“xcode-select --install
xcode-select: error: command line tools are already installed, use “Software Update” to install updates”

I greatly appreciate if anybody could help me with this issue.


Wondering whether this is a question no body knows the answer.

(Ajit Londhe) #3

@jreps - as you have a Mac, do you see these issues when installing SqlRender locally?

(Jreps) #4

I managed to get everything installed on my Mac. I think I did have some Xcode issue when I wanted to build packages but I think I just installed Xcode and set any necessary environmental variables. R doesn’t update the settings until you close and restart R, so if you set up Xcode during the R session you might still see the issue until you close and restart. If you installed Xcode ages ago maybe try updating it and see whether that fixes things?

(Seng Chan You) #5

I had a problem before I installed XCode in Mac. So as @jreps said, install XCode first. I think this solve the problem.

If you cannot solve this problem anyway, docker can be another solution.


Hi @SCYou

Docker would be a great solution. I have the docker container running. However, I am not sure how to run the patientlevelprediction in R Studio. Could you please point me to a place where I could find how to run the model with the docker.



Locally means download first and then install?