0

I'm running Python 3.5 with Anaconda on Windows 7 and i want to use rpy2. I already have R 3.3 installed which works perfectly well in RStudio.

pip install rpy2 

Returned

"Tried to guess R's HOME but no R command in the PATH"

I followed a solution proposed here and downloaded rpy2 2.8 and then

cd Downloads 
pip install rpy2-2.8.0+r33-cp35-cp35m-win32.whl 

which seemed to work (returning "Successfully installed rpy2-2.8.0").

However,

import rpy2 

in Spyder returns

"No module named 'rpy2'"

Please help, I'm lost...

Community
  • 1
  • 1
Heneark
  • 93
  • 1
  • 9
  • followed instruction for installing rpy2 [here](https://stackoverflow.com/questions/11165123/install-rpy2-on-windows7-64bit-for-python-2-7/29656592#29656592) – j. deo Jun 10 '20 at 03:40

2 Answers2

0

If you're desperate, you could install WinPython (for windows users) which has a lot of Packages already installed and ready to use, including rpy2, sometimes installing packages on windows can be stressful.

Or if you really want to make it work that way, maybe you could check if that package was installed in the Downloads folder and move it to the folder corresponding to python libraries

Rosa Alejandra
  • 732
  • 5
  • 21
  • Thanks a lot, it works with WinPython ! (I didn't write it all, but I tried everything for hours, including your second proposition which did not work better.) – Heneark May 24 '16 at 08:56
0

I think you has more than one installed python?!

If so, then "pip .. install .." installs the library into this python which you get when you type "python" in a shell/console.

If you want to install this 32Bit library with the 32Bit version of your python 3.5 you can type "py -3.5-32 -m pip .. install .."

"py -3.5-32" choose your 32Bit Python 3.5 interpreter (from your registry?) "-m pip" loads the module pip.

The rest of the pip command is the same like before, something with install ... packagename ..

Duncan MC Leod
  • 113
  • 1
  • 8