Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/282.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 在MacOS上安装rpy2_Python_R_Pip_Rpy2 - Fatal编程技术网

Python 在MacOS上安装rpy2

Python 在MacOS上安装rpy2,python,r,pip,rpy2,Python,R,Pip,Rpy2,我一直在尝试在MacOS Sierra上为Python 3.6安装RPy2,但pip安装未经编译就失败了 安装错误显示为以下消息: clang: error: unsupported option '-fopenmp' error: command 'clang' failed with exit status 1 安装过程中的任何帮助都将不胜感激。在thread中找到了解决方案 env CC=/usr/local/ceral/gcc/X.X.X/bin/gcc-X pip安装rpy2

我一直在尝试在MacOS Sierra上为Python 3.6安装RPy2,但pip安装未经编译就失败了

安装错误显示为以下消息:

  clang: error: unsupported option '-fopenmp'
  error: command 'clang' failed with exit status 1
安装过程中的任何帮助都将不胜感激。

在thread中找到了解决方案

env CC=/usr/local/ceral/gcc/X.X.X/bin/gcc-X pip安装rpy2

通过在您的计算机上用最新版本替换gcc版本来运行上述命令,应该可以解决此问题。例如,在我的mac电脑上,我运行


env CC=/usr/local/ceral/gcc/8.2.0/bin/gcc-8 pip-install rpy2
如果您安装了python软件包
wheel
pip-install
应该为OS X获取预编译的二进制文件,我相信。

如果使用Miniconda环境,这是可行的:

conda安装-c r rpy2

发件人:

  • 莫哈韦马科斯酒店

  • Python 3.8


在众多假定的解决方案中,这最终对我有效。非常感谢。这在2020年仍然会发生