gpt4 book ai didi

python - 安装rpy2时遇到错误: Tried to guess R's HOME but no R command in the PATH

转载 作者:太空狗 更新时间:2023-10-29 17:58:36 24 4
gpt4 key购买 nike

我在这里和其他地方看到了很多关于此错误的帖子,但所提议的解决方案似乎都不相关。我在 Python 2.7.9 , 我有 an R executable in my path ,我正在尝试将它安装在 RHEL 服务器上,而不是在 Windows 上。

这是我看到的具体错误。有谁知道是什么原因造成的或如何解决?谢谢!

$ pip install rpy2
Downloading/unpacking rpy2
Downloading rpy2-2.5.6.tar.gz (165kB): 165kB downloaded
Running setup.py (path:/tmp/pip_build_my520/rpy2/setup.py) egg_info for package rpy2
Error: Tried to guess R's HOME but no R command in the PATH.
Complete output from command python setup.py egg_info:
Error: Tried to guess R's HOME but no R command in the PATH.

最佳答案

从 Christoph Gohlke 的 Python 扩展包 Windows 存储库下载 rpy2‑2.7.5‑cp35‑none‑win_amd64.whl 文件 here .使用命令行,切换到下载文件夹并运行:

pip install rpy2‑2.5.5‑cp34‑none‑win_amd64.whl

这应该可以解决 R 目录问题,并且 rpy2 应该可以很好地安装。所有归功于MattDMo .

关于python - 安装rpy2时遇到错误: Tried to guess R's HOME but no R command in the PATH,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30083067/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com