2015-06-29 53 views
3

我試圖在我的Ubuntu 14.04服務器上設置rpy2在我失去了跟蹤的虛擬環境中已經得到這麼多不同的安裝/構建錯誤。這是我在設置iPython服務器時的最後一步,但我一直堅持rpy2安裝幾天。我嘗試了許多不同的東西,其中一些我確信彼此衝突並使我的生活更加艱難(比如安裝了雙R版本),但我放棄在沒有外部幫助的情況下嘗試這樣做。不能爲我的生活得到rpy2安裝 - 海灣合作委員會錯誤

各種各樣的東西我做:

  • 安裝了Python,開發和setuptools的
  • 安裝並更新PIP
  • 安裝和更新的gcc
  • 構建和從源代碼安裝R的最新版本
  • 從源碼構建並安裝R(r-devel)的開發版本使用Dirk Eddelbuetel's Docker file
  • [須藤] PIP穩定ř發展ř從源
  • 構建rpy2穩定ř發展R(與--ignore-check-rversion選項集)
  • easy_install的rpy2
  • PIP安裝和源與安裝安裝rpy2並沒有R_HOME設置爲穩定R(當前默認R是不穩定的發展verison)

如果任何人有任何想法,我能做些什麼來得到這個工作,除了從頭在一個乾淨的環境開始,那麼請讓我知道 - 它會gr吃得津津樂道。謝謝!!

是我得到的電流誤差如下:

(.venv)[email protected]:~/rpy2-2.6.0$ python setup.py build_ext --ignore-check-rversion install 
R Under development (unstable) (2015-06-16 r68524) -- "Unsuffered Consequences" 
setup.py:196: UserWarning: R did not seem to have the minimum required version number 
    warnings.warn("R did not seem to have the minimum required version number") 
/usr/local/lib/R/bin/R CMD config --ldflags 
R was not built as a library 
/usr/local/lib/R/bin/R CMD config --cppflags 
R was not built as a library 
setup.py:211: UserWarning: No include specified 
    warnings.warn('No include specified') 
setup.py:222: UserWarning: No libraries as -l arguments to the compiler. 
    warnings.warn('No libraries as -l arguments to the compiler.') 

    Compilation parameters for rpy2's C components: 
     include_dirs = [] 
     library_dirs = [] 
     libraries  = [] 
     extra_link_args = [] 

running build_ext 
R Under development (unstable) (2015-06-16 r68524) -- "Unsuffered Consequences" 
setup.py:77: UserWarning: R did not seem to have the minimum required version number 
    warnings.warn("R did not seem to have the minimum required version number") 
building 'rpy2.rinterface._rinterface' extension 
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DR_INTERFACE_PTRS=1 -DHAVE_POSIX_SIGJMP=1 -DRIF_HAS_RSIGHAND=1 -DCSTACK_DEFNS=1 -DHAS_READLINE=1 -I./rpy/rinterface -I/usr/local/lib/python2.7.9/include/python2.7 -c ./rpy/rinterface/_rinterface.c -o build/temp.linux-x86_64-2.7/./rpy/rinterface/_rinterface.o 
In file included from /usr/local/lib/python2.7.9/include/python2.7/Python.h:8:0, 
       from ./rpy/rinterface/_rinterface.c:55: 
/usr/local/lib/python2.7.9/include/python2.7/pyconfig.h:1182:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default] 
#define _POSIX_C_SOURCE 200112L 
^ 
In file included from /usr/include/signal.h:28:0, 
       from ./rpy/rinterface/_rinterface.c:51: 
/usr/include/features.h:230:0: note: this is the location of the previous definition 
# define _POSIX_C_SOURCE 200809L 
^ 
In file included from ./rpy/rinterface/_rinterface.c:58:0: 
./rpy/rinterface/_rinterface.h:8:15: fatal error: R.h: No such file or directory 
#include <R.h> 
      ^
compilation terminated. 
error: command 'gcc' failed with exit status 1 
+0

什麼是你的R版本? –

+0

R開發中(unstable)(2015-06-16 r68524) - 「未緩衝的後果」 版權(C)2015 R基金會統計計算 平臺:x86_64-unknown-linux-gnu(64位) – zap2008

+0

還安裝了3.0.2「飛盤帆船」,但默認設置爲開發版本 – zap2008

回答

0

我想我用apt-get的安裝是出於過期的的R版本。根據documentation,R 3.0「很可能」,我想我誤解了警告。 哎呀!

+1

那麼你能澄清你是如何解決它的?或者至少你正在使用哪些版本,以及你瞭解哪些版本是必需的? – nealmcb

相關問題