1

I'm trying to make it possible for Jupyter notebook to change from Python to R depending on the cells, following the instructions in this post. I am using Windows 10. I have installed Python 2 and 3 with anaconda, and use RStudio.

Unfortunately, when I try to install rpy2 on the command line, I get this error.

enter image description here

I modified the path in Environmental Variables by including the third line...

enter image description here

which seemed right given the location of R in...

enter image description here

but it didn't do the trick.

Antoni Parellada
  • 4,253
  • 6
  • 49
  • 114
  • To me it looks like R is found okay (and actually starts running), but something in the install script tries to call `sh`, which is usually a Mac/Linux/Unix program. Can you install `rpy2` through `conda` instead, like `conda install rpy2`? – Marius Jun 05 '17 at 04:08
  • @Marius Thank you for trying to help me. I get an error message: `Package missing in current Win-64 channels: -rpy2.` It goes on: `anaconda search -t conda rpy2.` – Antoni Parellada Jun 05 '17 at 04:27
  • Yes, if you do try `anaconda search -t conda rpy2` you'll see that a Win64 version of `rpy2` has been uploaded by some users. But I don't have any recent experience trying to install this on Windows myself, so can't advise about the best option. You might be best off searching for something like "Windows rpy2 install" to make sure you find Windows-specific instructions. – Marius Jun 05 '17 at 04:42
  • it should be installed from the R channel. "conda install -c r rpy2" – John Morrison Jun 13 '17 at 18:20

0 Answers0