<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Failed to install cluster scoped SparkR library in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/failed-to-install-cluster-scoped-sparkr-library/m-p/11279#M6285</link>
    <description>&lt;P&gt;Hi @Ross Hamilton​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe SparkR comes inbuilt with Databricks RStudio and you don't have to install it explicitly. You can directly import it with library(SparkR) and it works for you from your above comment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1652i90E5AAD9E2834A7F/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;The error message you see could be red herring. Does this answer your question or am I missing something?&lt;/P&gt;</description>
    <pubDate>Thu, 04 Aug 2022 21:08:54 GMT</pubDate>
    <dc:creator>Vivian_Wilfred</dc:creator>
    <dc:date>2022-08-04T21:08:54Z</dc:date>
    <item>
      <title>Failed to install cluster scoped SparkR library</title>
      <link>https://community.databricks.com/t5/data-engineering/failed-to-install-cluster-scoped-sparkr-library/m-p/11275#M6281</link>
      <description>&lt;P&gt;Attempting to install SparkR to the cluster and successfully installed other packages such as tidyverse via CRAN. The error is copied below, any help you can provide is greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Databricks runtime 10.4 LTS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Library installation attempted on the driver node of cluster 0527-101647-p8flqbiy and failed. Please refer to the following error message to fix the library or contact Databricks support. Error Code: DRIVER_LIBRARY_INSTALLATION_FAILURE. Error Message: Error: Error installing R package: Could not install package with error: package ‘SparkR’ is not available for this version of R&lt;/P&gt;&lt;P&gt;Full error log available at /databricks/driver/library-install-logs/r-package-installation-2022-08-04T12:04:30Z-8gumapnw.log&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error: Error installing R package: Could not install package with error: package ‘SparkR’ is not available for this version of R&lt;/P&gt;&lt;P&gt;Full error log available at /databricks/driver/library-install-logs/r-package-installation-2022-08-04T12:04:30Z-8vp_gpk1.log&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 12:10:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/failed-to-install-cluster-scoped-sparkr-library/m-p/11275#M6281</guid>
      <dc:creator>Ross</dc:creator>
      <dc:date>2022-08-04T12:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to install cluster scoped SparkR library</title>
      <link>https://community.databricks.com/t5/data-engineering/failed-to-install-cluster-scoped-sparkr-library/m-p/11276#M6282</link>
      <description>&lt;P&gt;hi @Ross Hamilton​&amp;nbsp;this looks like the packages are failing to get installed. You can check the log to understand what is the issue. &lt;/P&gt;&lt;P&gt;I believe the failure is caused because of dependency missing. I would recommend checking for the dependent libraries and installing them. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try the below steps as well.&lt;/P&gt;&lt;P&gt;a) Install lib using command from notebook.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;install.packages()&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;b) Copy installed lib to dbfs.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;cp -R /local_disk/env /dbfs/path_to_r_library&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;c) Use init script to get installed libs in cluster lib path.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;## Define contents of script
script = """
#!/bin/bash
R --vanilla &amp;lt;&amp;lt;EOF
system("cp -R /dbfs/path_to_r_library /databricks/spark/R/lib/", intern = T)
q()
EOF
"""&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 12:23:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/failed-to-install-cluster-scoped-sparkr-library/m-p/11276#M6282</guid>
      <dc:creator>Prabakar</dc:creator>
      <dc:date>2022-08-04T12:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to install cluster scoped SparkR library</title>
      <link>https://community.databricks.com/t5/data-engineering/failed-to-install-cluster-scoped-sparkr-library/m-p/11277#M6283</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm afraid the solution doesn't work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;install.packages("SparkR")
&amp;nbsp;
Installing package into ‘/local_disk0/.ephemeral_nfs/envs/rEnv-1c6d7759-7751-4681-8489-a027452405f0’
(as ‘lib’ is unspecified)
Warning: package ‘SparkR’ is not available for this version of R
&amp;nbsp;
A version of this package for your version of R might be available elsewhere,
see the ideas at
&lt;A href="https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages" target="test_blank"&gt;https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages&lt;/A&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However if I go to load the library SparkR this works fine. I think it's the same issue when installing the package to the cluster.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;library(SparkR)
&amp;nbsp;
Attaching package: ‘SparkR’
&amp;nbsp;
The following object is masked _by_ ‘.GlobalEnv’:
&amp;nbsp;
    setLocalProperty
&amp;nbsp;
The following objects are masked from ‘package:stats’:
&amp;nbsp;
    cov, filter, lag, na.omit, predict, sd, var, window
&amp;nbsp;
The following objects are masked from ‘package:base’....&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 13:11:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/failed-to-install-cluster-scoped-sparkr-library/m-p/11277#M6283</guid>
      <dc:creator>Ross</dc:creator>
      <dc:date>2022-08-04T13:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to install cluster scoped SparkR library</title>
      <link>https://community.databricks.com/t5/data-engineering/failed-to-install-cluster-scoped-sparkr-library/m-p/11278#M6284</link>
      <description>&lt;P&gt;Do you find any information in the logs?&lt;/P&gt;&lt;P&gt;Full error log available at /databricks/driver/library-install-logs/r-package-installation-2022-08-04T12:04:30Z-8vp_gpk1.log&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 14:24:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/failed-to-install-cluster-scoped-sparkr-library/m-p/11278#M6284</guid>
      <dc:creator>Prabakar</dc:creator>
      <dc:date>2022-08-04T14:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to install cluster scoped SparkR library</title>
      <link>https://community.databricks.com/t5/data-engineering/failed-to-install-cluster-scoped-sparkr-library/m-p/11279#M6285</link>
      <description>&lt;P&gt;Hi @Ross Hamilton​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe SparkR comes inbuilt with Databricks RStudio and you don't have to install it explicitly. You can directly import it with library(SparkR) and it works for you from your above comment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1652i90E5AAD9E2834A7F/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;The error message you see could be red herring. Does this answer your question or am I missing something?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 21:08:54 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/failed-to-install-cluster-scoped-sparkr-library/m-p/11279#M6285</guid>
      <dc:creator>Vivian_Wilfred</dc:creator>
      <dc:date>2022-08-04T21:08:54Z</dc:date>
    </item>
  </channel>
</rss>

