Install PythonInR in Mac OS Mojave

Hello All

I am trying to install PythonInR in Mac OS Mojave.
I have Python 3.6, RStudio Version 1.2.5001, R version 3.6.1.
I tried two different methods.

Method 1: As it is explained in

When I enter the last command a dialog box popped up with text "Building R package from source requires installation of additional build tools. Do you want to install the additional tools now?." I clicked Yes and installed XCode. Then I restarted everything. However, it is still giving the same error. For some reasons R Studio Can not detect XCode Command line tool. I typed "xcode-select --install" in my Terminal and it says "command line tools are already installed, use "Software Update" to install updates." I found that this seems to be a common problem for many other people with R Studio. I tried everything suggested, but nothing worked for me. If you have any hint that would greatly help me.

Method 2:
Since the method 1 fails I also tried "". The it gives me

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

So, I failed both methods. I greatly appreciate if anybody could help me with this.

You are not supposed to run all those commands, you should either use install.packages("PythonInR") for getting the CRAN version OR devtools::install_bitbucket("Floooo/PythonInR") for getting the development version

Do you get an error message when you run install.packages("PythonInR")?

1 Like

Thanks you very much @andresrcs. I just ran install.packages("PythonInR"). The problem solved.

That's not related to your problem, but if your goal is to run Python from R, then you might have easier time using reticulate package from RStudio.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.