Loading rpy2 : ImportError: version `GOMP_4.0' not found
Loading rpy2 : ImportError: version `GOMP_4.0' not found
在 Jupyter Notebook 或控制台中加载 rpy2 时出现以下错误:
Traceback (most recent call last):
File "/home/louis/anaconda3/lib/python3.5/runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "/home/louis/anaconda3/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/louis/anaconda3/lib/python3.5/site-packages/rpy2/tests.py", line 23, in <module>
import rpy2.tests_rpy_classic
File "/home/louis/anaconda3/lib/python3.5/site- packages/rpy2/tests_rpy_classic.py", line 3, in <module>
import rpy2.rpy_classic as rpy
File "/home/louis/anaconda3/lib/python3.5/site-packages/rpy2/rpy_classic.py", line 5, in <module>
import rpy2.rinterface as ri
File "/home/louis/anaconda3/lib/python3.5/site-packages/rpy2/rinterface/__init__.py", line 92, in <module>
from rpy2.rinterface._rinterface import (baseenv,
ImportError: /home/louis/anaconda3/lib/libgomp.so.1: version `GOMP_4.0' not found (required by /usr/lib/R/lib/libR.so)
- R 版本:3.2.3
- Python 版本:3.5.2 :: Anaconda 自定义(64 位)
- OS : ubuntu 16.04 LTS 64 位
- rpy2 版本:2.8.5
我不知道它有多相关,但我安装了 gcc,我可以在 python 中导入 rpy2。
如有任何帮助或提示,我们将不胜感激。
根据 omri_saadon 的评论,我将 LD_LIBRARY_PATH
设置为所有指向 libgomp 目录的路径,它们是:
- $HOME/anaconda3/pkgs/gcc-4.8.5-7/库
- $HOME/anaconda3/pkgs/libgcc-4.8.5-2/库
- $HOME/anaconda3/pkgs/lib
但每次都出现同样的错误:
ImportError: path_to_libgomp/libgomp.so.1: version `GOMP_4.0' not found (required by /usr/lib/R/lib/libR.so)
所以我的探索还在继续^^(我必须承认我真的不知道我在做什么的来龙去脉)。
当我成功设置 export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
(在根模式下找到)时,我有另一种错误:
import rpy2.rinterface as ri
File "/home/louis/anaconda3/lib/python3.5/site- packages/rpy2/rinterface/__init__.py", line 92, in <module>
from rpy2.rinterface._rinterface import (baseenv,
ImportError: /home/louis/anaconda3/bin/../lib/libreadline.so.6: undefined symbol: PC
然后当我尝试首先导入 readline
包时(因为它似乎对某些包有效)我得到:
import rpy2.rinterface as rinterface
File "/home/louis/anaconda3/lib/python3.5/site-packages/rpy2/rinterface/__init__.py", line 92, in <module>
from rpy2.rinterface._rinterface import (baseenv,
ImportError: /usr/lib/libblas.so.3: undefined symbol: gotoblas
你试过了吗
RUN conda install -y gcc
这似乎适用于有类似问题的人 -- Missing GOMP_parallel or GOMP_4.0 in (Docker) jupyter/all-spark-notebook: both R and Python
看来我终于安装使用rpy2成功了
我做了什么?
我用 conda 包管理器安装它,而不是 pip。仅 conda install rpy2
,我就完成了。
在 Jupyter Notebook 或控制台中加载 rpy2 时出现以下错误:
Traceback (most recent call last):
File "/home/louis/anaconda3/lib/python3.5/runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "/home/louis/anaconda3/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/louis/anaconda3/lib/python3.5/site-packages/rpy2/tests.py", line 23, in <module>
import rpy2.tests_rpy_classic
File "/home/louis/anaconda3/lib/python3.5/site- packages/rpy2/tests_rpy_classic.py", line 3, in <module>
import rpy2.rpy_classic as rpy
File "/home/louis/anaconda3/lib/python3.5/site-packages/rpy2/rpy_classic.py", line 5, in <module>
import rpy2.rinterface as ri
File "/home/louis/anaconda3/lib/python3.5/site-packages/rpy2/rinterface/__init__.py", line 92, in <module>
from rpy2.rinterface._rinterface import (baseenv,
ImportError: /home/louis/anaconda3/lib/libgomp.so.1: version `GOMP_4.0' not found (required by /usr/lib/R/lib/libR.so)
- R 版本:3.2.3
- Python 版本:3.5.2 :: Anaconda 自定义(64 位)
- OS : ubuntu 16.04 LTS 64 位
- rpy2 版本:2.8.5
我不知道它有多相关,但我安装了 gcc,我可以在 python 中导入 rpy2。
如有任何帮助或提示,我们将不胜感激。
根据 omri_saadon 的评论,我将 LD_LIBRARY_PATH
设置为所有指向 libgomp 目录的路径,它们是:
- $HOME/anaconda3/pkgs/gcc-4.8.5-7/库
- $HOME/anaconda3/pkgs/libgcc-4.8.5-2/库
- $HOME/anaconda3/pkgs/lib
但每次都出现同样的错误:
ImportError: path_to_libgomp/libgomp.so.1: version `GOMP_4.0' not found (required by /usr/lib/R/lib/libR.so)
所以我的探索还在继续^^(我必须承认我真的不知道我在做什么的来龙去脉)。
当我成功设置 export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
(在根模式下找到)时,我有另一种错误:
import rpy2.rinterface as ri
File "/home/louis/anaconda3/lib/python3.5/site- packages/rpy2/rinterface/__init__.py", line 92, in <module>
from rpy2.rinterface._rinterface import (baseenv,
ImportError: /home/louis/anaconda3/bin/../lib/libreadline.so.6: undefined symbol: PC
然后当我尝试首先导入 readline
包时(因为它似乎对某些包有效)我得到:
import rpy2.rinterface as rinterface
File "/home/louis/anaconda3/lib/python3.5/site-packages/rpy2/rinterface/__init__.py", line 92, in <module>
from rpy2.rinterface._rinterface import (baseenv,
ImportError: /usr/lib/libblas.so.3: undefined symbol: gotoblas
你试过了吗
RUN conda install -y gcc
这似乎适用于有类似问题的人 -- Missing GOMP_parallel or GOMP_4.0 in (Docker) jupyter/all-spark-notebook: both R and Python
看来我终于安装使用rpy2成功了
我做了什么?
我用 conda 包管理器安装它,而不是 pip。仅 conda install rpy2
,我就完成了。