LoginSignup
0
0

More than 3 years have passed since last update.

DatabricksでRのProphetをインストールする際のエラーと対策

Last updated at Posted at 2021-05-13

最近遭遇したので解決策をメモします。

現象

Databricksのクラスターライブラリとしてprophetをインストールしようとすると、以下のエラーでインストールできません。

java.lang.RuntimeException: Installation failed with message: 
Error installing R package: Could not install package with error:   installation of package 'V8' had non-zero exit status
  installation of package 'rstan' had non-zero exit status
  installation of package 'prophet' had non-zero exit status
Full error log available at /databricks/driver/library-install-logs/r-package-installation-2021-05-12T09:28:44Z-ue08v7_4.log

解決策

クラスターのinit scriptでV8をインストールします。その後、クラスターライブラリとしてProphetをインストールします。

Python

RのノートブックでPythonを実行しているので、%pythonマジックコマンドを指定しています。

%python
dbutils.fs.put("/databricks/scripts/v8-install.sh","""
sudo apt-get install -y libv8-dev""", True)

init scriptをクラスターに設定します。

クラスターライブラリとしてProphetをインストールします。

Databricks 無料トライアル

Databricks 無料トライアル

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0