Я использую альпийский как базовое изображение в моем докер-файле. И я пытаюсь установить R и rpy2 в моем dockerfile.
RUN apk add R R-dev
pip3 install rpy2
~ # python3 -m 'rpy2.tests'
/usr/local/lib/python3.6/site-packages/rpy2/rinterface/__init__.py:186: RRuntimeWarning: Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/lib/R/library/utils/libs/utils.so':
Error relocating /usr/lib/R/library/utils/libs/utils.so: lzma_crc64: symbol not found
warnings.warn(x, RRuntimeWarning)
/usr/local/lib/python3.6/site-packages/rpy2/rinterface/__init__.py:186: RRuntimeWarning: In addition:
warnings.warn(x, RRuntimeWarning)
/usr/local/lib/python3.6/site-packages/rpy2/rinterface/__init__.py:186: RRuntimeWarning: Warning message:
warnings.warn(x, RRuntimeWarning)
/usr/local/lib/python3.6/site-packages/rpy2/rinterface/__init__.py:186: RRuntimeWarning: package ‘utils’ in options("defaultPackages") was not found
warnings.warn(x, RRuntimeWarning)
/usr/local/lib/python3.6/site-packages/rpy2/rinterface/__init__.py:186: RRuntimeWarning: During startup -
warnings.warn(x, RRuntimeWarning)
/usr/local/lib/python3.6/site-packages/rpy2/rinterface/__init__.py:186: RRuntimeWarning: package ‘stats’ in options("defaultPackages") was not found
warnings.warn(x, RRuntimeWarning)
rpy2 version: 2.8.5
- built against R version: 3-3.3--72310
- running linked to R version: R version 3.3.3 (2017-03-06)
/usr/local/lib/python3.6/site-packages/rpy2/rinterface/__init__.py:186: RRuntimeWarning: Error in .Primitive("as.environment")("package:utils") :
no item called "package:utils" on the search list
warnings.warn(x, RRuntimeWarning)
E
======================================================================
ERROR: __main__ (unittest.loader._FailedTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/rpy2/tests.py", line 43, in load_tests
suite_robjects = loader.discover('robjects', pattern, rpy_root)
File "/usr/local/lib/python3.6/unittest/loader.py", line 290, in discover
__import__(start_dir)
File "/usr/local/lib/python3.6/site-packages/rpy2/robjects/__init__.py", line 19, in <module>
from rpy2.robjects.robject import RObjectMixin, RObject
File "/usr/local/lib/python3.6/site-packages/rpy2/robjects/__init__.py", line 20, in <module>
from rpy2.robjects.vectors import (BoolVector,
File "/usr/local/lib/python3.6/site-packages/rpy2/robjects/vectors.py", line 31, in <module>
utils_ri = rinterface.baseenv['as.environment'](rinterface.StrSexpVector(("package:utils", )))
rpy2.rinterface.RRuntimeError: Error in .Primitive("as.environment")("package:utils") :
no item called "package:utils" on the search list
----------------------------------------------------------------------
Ran 1 test in 0.001s
FAILED (errors=1)