【问题标题】:Installing RPostgres Library in Jupyter Notebook on Google Cloud Platform在 Google Cloud Platform 上的 Jupyter Notebook 中安装 RPostgres 库
【发布时间】:2021-09-18 10:14:50
【问题描述】:

我正在尝试在 R 中安装 RPostgres 库,但我在 Google Cloud Platform 上使用 JupyterLab。我在 github.com/r-dbi/RPostgres 上找到了一些建议,但没有一个包含使用 Google Cloud Notebooks 时的信息。

即使在将包放入 JupyterLab 上的正确文件夹后尝试从源代码安装包后,我仍然收到 RPostgres 具有“非零退出状态”的错误:

install.packages("MyPath/RPostgres_1.3.3.tar.gz", repos=NULL, type='source')

我收到相同的错误消息 RPostgres 有“非零退出状态”。谢谢。

【问题讨论】:

    标签: r google-cloud-platform installation rpostgres


    【解决方案1】:

    要解决此问题,您首先需要安装“libpq-dev”,因为这是SO answer 的先决条件。请按照以下步骤将其应用到 Google Cloud Notebook 中。

    • 在你的 JupyterLab 中打开一个终端并执行sudo apt-get install libpq-dev

    • 打开一个 R 笔记本,使用 install.packages("RPostgres") 安装 Rpostgres

    • 运行library()并检查是否安装正确

    请注意,我用于测试的机器是在 AI Platform -> Notebooks -> R 实例中创建的。

    【讨论】:

      猜你喜欢
      • 2020-06-08
      • 2019-01-20
      • 2021-05-01
      • 2019-10-30
      • 2019-08-27
      • 1970-01-01
      • 2018-07-18
      • 2020-09-09
      • 2019-02-02
      相关资源
      最近更新 更多