Rpy2: Anaconda 2 error message ' command "python setup.py.egg.info" failed with error 1

242 views Asked by At

I am trying to install the rpy2 package from Anaconda 2.

Pip found rpy2 and downloaded but then it gave me the following output resulting in an error message:

   C:\Users\ALEX\Anaconda2\Scripts>pip install rpy2 
   Collecting rpy2  
   Using cached rpy2-2.8.5.tar.gz                                                    
   Complete output from command python setup.py egg_info:                          
   R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"                         
   Copyright (C) 2016 The R Foundation for Statistical Computing                   
   Platform: x86_64-w64-mingw32/x64 (64-bit)                                                                                                                       
   R is free software and comes with ABSOLUTELY NO WARRANTY.                       
   You are welcome to redistribute it under the terms of the                       
   GNU General Public License versions 2 or 3.                                     
  For more information about these matters see                                    
   http://www.gnu.org/licenses/.                                                                                                                                   
 'sh' is not recognized as an internal or external command,                      
  operable program or batch file.                                                 
   R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"                         
   C:\PROGRA~1\R\R-33~1.2\bin\x64\R CMD config --ldflags                           
  Traceback (most recent call last):                                                
  File "<string>", line 1, in <module>                                            
  File "c:\users\alex\appdata\local\temp\pip-build-p9qyoo\rpy2\setup.py", line 331, in <module>                                                                  
  ri_ext = getRinterface_ext()                                                  
  File "c:\users\alex\appdata\local\temp\pip-build-p9qyoo\rpy2\setup.py", 
  line 238, in getRinterface_ext                                                            
  ldf = shlex.split(' '.join(rexec.cmd_config('--ldflags')))                    
  File "c:\users\alex\appdata\local\temp\pip-build-p9qyoo\rpy2\setup.py", 
  line 191, in cmd_config                                                                   
  universal_newlines = True)                                                    
  File "C:\Users\ALEX\Anaconda2\lib\subprocess.py", line 574, in 
  check_output                                                                                       
  raise CalledProcessError(retcode, cmd, output=output)                       
  subprocess.CalledProcessError: Command '('C:\\PROGRA~1\\R\\R-
  33~1.2\\bin\\x64\\R', 'CMD', 'config', '--ldflags')' returned non-zero 
  exit status 1           
  ----------------------------------------------------------------------
  Command "python setup.py egg_info" failed with error code 1 in
   c:\users\alex\appdata\local\temp\pip-build-p9qyoo\rpy2\

I researched about this error message in stackoverflow and I found some advice. E.g. download and run the ez_setup.py script ( Can't install via pip because of egg_info error) I did it but it had no effect.

Your advice will be appreciated.

0

There are 0 answers