【问题标题】:ansible rpy2 install with pip complain about R's homeansible rpy2 install with pip 抱怨 R 的家
【发布时间】:2016-05-01 23:43:00
【问题描述】:

我在虚拟环境中使用 pip: 扮演角色:

- name: pip Install packages into virtualenv
  pip: >
    name={{ item }} virtualenv="{{ home }}/{{ venv_name }}"
    virtualenv_site_packages="no"
  with_items:
    - rpy2

安装rpy2时出现此错误:

failed: [vagrant] => (item=rpy2) => {"cmd": "/home/toto/venv  /bin/pip install rpy2",
                                      "failed": true, "item": "rpy2"}
msg: stdout: Collecting rpy2
Downloading rpy2-2.7.8.tar.gz (178kB)
  Complete output from command python setup.py egg_info:
  Error: Tried to guess R's HOME but no command (R) in the PATH.

如何以可靠的方式告知 R home 在 ~/R 中?

【问题讨论】:

    标签: ansible rpy2


    【解决方案1】:

    一种简单的方法是将 R 放在 PATH 中。

    如果我正确理解 ansible's doc(我不知道/使用 ansible),则可以通过以下方式完成:

    environment:
      PATH: "/your/home/R:{{ ansible_env.PATH }}"
    

    【讨论】:

      猜你喜欢
      • 2019-05-17
      • 2020-04-08
      • 1970-01-01
      • 2019-01-01
      • 2011-12-30
      • 2020-08-24
      • 1970-01-01
      • 2022-12-02
      • 2018-06-18
      相关资源
      最近更新 更多