Install rpy2 on Ubuntu

I am new to Linux and am having serious problems installing Rpy2. I had old versions of Rpy2 installed by the synaptic package manager, but I needed an updated version and deleted it (all the files in the Rpy2 directory, as described in the Rpy2 documentation). I downloaded tar.gz. from SourceForge and ran this code:

tar -xzf rpy2-2.1.8.tar.gz cd rpy2-2.1.8 python setup.py build install 

It seemed like it was copying the files as it should, but then a few pages of error messages ( in bold ) just start to float:

 running build_ext Configuration for R as a library: include_dirs: ('/usr/share/R/include',) libraries: ('lapack', 'blas', 'R') library_dirs: ('/usr/lib/R/lib',) extra_link_args: () # OSX-specific (included in extra_link_args) framework_dirs: () frameworks: () building 'rpy2.rinterface.rinterface' extension creating build/temp.linux-i686-2.6 creating build/temp.linux-i686-2.6/rpy creating build/temp.linux-i686-2.6/rpy/rinterface gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DR_INTERFACE_PTRS=1 -DHAVE_POSIX_S IGJMP=1 -DCSTACK_DEFNS=1 -DRIF_HAS_RSIGHAND=1 -Irpy/rinterface -I/usr/include/python2.6 -I/usr/share/R/include -c rpy/rinterface/rinterface.c -o build/temp.linux-i686-2.6/rpy/rinterface/rinterface.o **rpy/rinterface/rinterface.c:55:20: error: Python.h: No such file or directory** In file included from rpy/rinterface/rinterface.c:74: /usr/share/R/include/R_ext/Rdynload.h:26: warning: function declaration isn't a prototype 

I hope you help me.

Thanks Lasse

+4
source share
1 answer

It looks like you do not have the python-dev package on your system.

+5
source

Source: https://habr.com/ru/post/1335974/


All Articles