首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >问答首页 >无法通过MAC OS中的pip安装rpy2

无法通过MAC OS中的pip安装rpy2
EN

Stack Overflow用户
提问于 2016-03-19 21:02:57
回答 1查看 790关注 0票数 1

我无法在MAC中通过pip或PyCharm安装PyCharm( package)。

但是我可以成功地运行Python(通过PyCharm)和R(通过RStudio) .

主要错误消息是

“错误:试图猜测R的家,但在路径中没有命令(R)。”“命令”"python setup.py egg_info“失败,错误代码1出现在/private/tmp//rpy2 2/”。

我想这个问题可能与R环境路径设置有关?

但我还是不知道怎么解决这个问题..。

完整的错误消息如下:

代码语言:javascript
代码运行次数:0
运行
复制
host-217:~ ChenGuanYing$ sudo pip install rpy2
The directory '/Users/ChenGuanYing/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/ChenGuanYing/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting rpy2
  Downloading rpy2-2.7.8.tar.gz (178kB)
    100% |████████████████████████████████| 184kB 1.1MB/s 
    Complete output from command python setup.py egg_info:
    Error: Tried to guess R's HOME but no command (R) in the PATH.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-OtKzsd/rpy2/

EN

回答 1

Stack Overflow用户

发布于 2016-03-20 07:47:58

正如错误信息中所建议的,有两种可能的解决方案:

  1. 导出R_HOME=
  2. 将R命令放在系统路径中
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36107119

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档