<?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 Serverless: ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/serverless-error-could-not-install-packages-due-to-an-oserror/m-p/117468#M45505</link>
    <description>&lt;P&gt;Hello guys!&lt;/P&gt;&lt;P&gt;I am getting this error when running a job:&lt;/P&gt;&lt;P&gt;ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.11/site-packages/some-python-package'&lt;/P&gt;&lt;P&gt;I have listed a wheel file as a dependency in the job environment and running a python script.&lt;/P&gt;&lt;P&gt;I have seen this error before, when I was trying to install a python package via the databricks terminal. That was when I got to know that Databricks doesn't allow you to install packages from terminal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this error shouldn't happen when running a job, right? In the job, you have no way of installing packages from anywhere else but the designated job environment.&lt;/P&gt;&lt;P&gt;Please guide me through how to resolve it and get my jobs running again.&lt;/P&gt;</description>
    <pubDate>Fri, 02 May 2025 06:04:30 GMT</pubDate>
    <dc:creator>anmol-aidora</dc:creator>
    <dc:date>2025-05-02T06:04:30Z</dc:date>
    <item>
      <title>Serverless: ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied</title>
      <link>https://community.databricks.com/t5/data-engineering/serverless-error-could-not-install-packages-due-to-an-oserror/m-p/117468#M45505</link>
      <description>&lt;P&gt;Hello guys!&lt;/P&gt;&lt;P&gt;I am getting this error when running a job:&lt;/P&gt;&lt;P&gt;ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.11/site-packages/some-python-package'&lt;/P&gt;&lt;P&gt;I have listed a wheel file as a dependency in the job environment and running a python script.&lt;/P&gt;&lt;P&gt;I have seen this error before, when I was trying to install a python package via the databricks terminal. That was when I got to know that Databricks doesn't allow you to install packages from terminal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this error shouldn't happen when running a job, right? In the job, you have no way of installing packages from anywhere else but the designated job environment.&lt;/P&gt;&lt;P&gt;Please guide me through how to resolve it and get my jobs running again.&lt;/P&gt;</description>
      <pubDate>Fri, 02 May 2025 06:04:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/serverless-error-could-not-install-packages-due-to-an-oserror/m-p/117468#M45505</guid>
      <dc:creator>anmol-aidora</dc:creator>
      <dc:date>2025-05-02T06:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: Serverless: ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied</title>
      <link>https://community.databricks.com/t5/data-engineering/serverless-error-could-not-install-packages-due-to-an-oserror/m-p/117913#M45584</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/163091"&gt;@anmol-aidora&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;The error you’re seeing happens because the job is trying to install a package into a system directory (&lt;SPAN class=""&gt;/local_disk0/...&lt;/SPAN&gt;) where it doesn’t have the necessary permissions.&lt;/P&gt;&lt;P&gt;The correct way to install a &lt;SPAN class=""&gt;.whl&lt;/SPAN&gt; file for a job is by using the &lt;SPAN class=""&gt;&lt;STRONG&gt;Libraries&lt;/STRONG&gt;&lt;/SPAN&gt; system in Databricks, and this should be done &lt;SPAN class=""&gt;&lt;STRONG&gt;when configuring the cluster&lt;/STRONG&gt;&lt;/SPAN&gt; that runs the job.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Captura de pantalla 2025-05-06 a las 15.51.21.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/16520i4957C99A7F83C15C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Captura de pantalla 2025-05-06 a las 15.51.21.png" alt="Captura de pantalla 2025-05-06 a las 15.51.21.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class=""&gt;When setting up the cluster (either directly or through the job configuration), you can attach a library from several sources:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;DBFS&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Volumes&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;S3&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;Maven or PyPI&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;Workspace&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN class=""&gt;And different Library types:&lt;STRONG&gt; .jar, .zip, . tar, .whl, etc.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;Once the library is attached to the cluster, Databricks will ensure it is installed before your job starts, and it will be available during execution without requiring any manual installation from code.&lt;/P&gt;&lt;P class=""&gt;In short: do not install packages inside the job script. Use the job or cluster configuration to attach the &lt;SPAN class=""&gt;.whl&lt;/SPAN&gt; as a library. That will resolve the permission issue and ensure your environment is ready.&lt;/P&gt;&lt;P class=""&gt;Hope this helps!, &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Isi&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 13:56:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/serverless-error-could-not-install-packages-due-to-an-oserror/m-p/117913#M45584</guid>
      <dc:creator>Isi</dc:creator>
      <dc:date>2025-05-06T13:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Serverless: ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied</title>
      <link>https://community.databricks.com/t5/data-engineering/serverless-error-could-not-install-packages-due-to-an-oserror/m-p/117921#M45585</link>
      <description>&lt;P&gt;Hi Isi, I am not trying to install the `.whl` file in the notebook, in fact I am not using a notebook.&lt;/P&gt;&lt;P&gt;Here is my anonymised job script:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;resources:
jobs:
download_job_1234:
name: download_job
tasks:
- task_key: download_raw_files
spark_python_task:
python_file: /Workspace/Users/abcd/download_raw_files.py
min_retry_interval_millis: 900000
disable_auto_optimization: false
environment_key: download_raw_files_env
queue:
enabled: true
environments:
- environment_key:download_raw_files_env
spec:
client: "2"
dependencies:
- /Volumes/workspace/default/dists/abcd.whl&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for pointing out the `Libraries` feature. I will look for it in the UI, as it's not listed in my UI. Is it available in databricks-serverless?&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 06 May 2025 14:22:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/serverless-error-could-not-install-packages-due-to-an-oserror/m-p/117921#M45585</guid>
      <dc:creator>anmol-aidora</dc:creator>
      <dc:date>2025-05-06T14:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: Serverless: ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied</title>
      <link>https://community.databricks.com/t5/data-engineering/serverless-error-could-not-install-packages-due-to-an-oserror/m-p/117927#M45586</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/163091"&gt;@anmol-aidora&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;The Libraries section in the UI is available under &lt;SPAN class=""&gt;&lt;STRONG&gt;Compute &amp;gt; select your cluster &amp;gt; Libraries&lt;/STRONG&gt;&lt;/SPAN&gt;. To make sure your &lt;SPAN class=""&gt;.whl&lt;/SPAN&gt; file is accessible and valid, you could try attaching it manually to an &lt;SPAN class=""&gt;&lt;STRONG&gt;interactive cluster&lt;/STRONG&gt;&lt;/SPAN&gt; using the UI, just like I showed in my previous message.&lt;/P&gt;&lt;P class=""&gt;Try attaching the &lt;SPAN class=""&gt;.whl&lt;/SPAN&gt; to another cluster and see if it installs correctly. If it works, at least we know that the file is accessible and the package installs properly. I’ve seen some issues in the past where &lt;SPAN class=""&gt;&lt;STRONG&gt;jobs couldn’t access volumes properly&lt;/STRONG&gt;&lt;/SPAN&gt;, even though the file existed.&lt;/P&gt;&lt;P class=""&gt;As an alternative, you could translate the volume path into a direct &lt;SPAN class=""&gt;&lt;STRONG&gt;bucket or container path&lt;/STRONG&gt;&lt;/SPAN&gt;. Since a volume (external volumen) is essentially just a layer over your object storage managed via Unity Catalog, you can instead point to the underlying &lt;SPAN class=""&gt;file system path.&lt;BR /&gt;&lt;BR /&gt;Hope this helps, &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Isi&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 14:51:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/serverless-error-could-not-install-packages-due-to-an-oserror/m-p/117927#M45586</guid>
      <dc:creator>Isi</dc:creator>
      <dc:date>2025-05-06T14:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Serverless: ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied</title>
      <link>https://community.databricks.com/t5/data-engineering/serverless-error-could-not-install-packages-due-to-an-oserror/m-p/117993#M45594</link>
      <description>&lt;P&gt;Hi Isi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't have any clusters available for which I can set up the&amp;nbsp;Libraries, I am using databricks serverless&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anmolaidora_0-1746564158274.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/16537i788E834CF7C24B5B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="anmolaidora_0-1746564158274.png" alt="anmolaidora_0-1746564158274.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 20:46:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/serverless-error-could-not-install-packages-due-to-an-oserror/m-p/117993#M45594</guid>
      <dc:creator>anmol-aidora</dc:creator>
      <dc:date>2025-05-06T20:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Serverless: ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied</title>
      <link>https://community.databricks.com/t5/data-engineering/serverless-error-could-not-install-packages-due-to-an-oserror/m-p/118134#M45608</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/163091"&gt;@anmol-aidora&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P class=""&gt;Thanks for sharing the screenshot! Just to clarify, the compute you’re showing is a &lt;SPAN class=""&gt;&lt;STRONG&gt;SQL Warehouse&lt;/STRONG&gt;&lt;/SPAN&gt;, which only supports &lt;SPAN class=""&gt;&lt;STRONG&gt;SQL&lt;/STRONG&gt;&lt;/SPAN&gt;. That means you can’t install Python libraries or run Python code there, since it doesn’t include a Python runtime.&lt;/P&gt;&lt;P class=""&gt;This comes up often, so I just wanted to point it out in case there’s any confusion &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;. To test and install &lt;SPAN class=""&gt;.whl&lt;/SPAN&gt; packages, you’ll need to use an &lt;SPAN class=""&gt;&lt;STRONG&gt;interactive cluster&amp;nbsp;(All-purpouse compute)&lt;/STRONG&gt;&lt;/SPAN&gt;, which supports &lt;SPAN class=""&gt;&lt;STRONG&gt;Python, SQL, and Scala&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P class=""&gt;Also, just to clarify: SQL Warehouses are considered Classic, Pro or Serverless, but &lt;SPAN class=""&gt;&lt;STRONG&gt;interactive clusters are not,&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;they must be created and managed separately.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Isi&lt;/P&gt;</description>
      <pubDate>Wed, 07 May 2025 11:28:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/serverless-error-could-not-install-packages-due-to-an-oserror/m-p/118134#M45608</guid>
      <dc:creator>Isi</dc:creator>
      <dc:date>2025-05-07T11:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Serverless: ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied</title>
      <link>https://community.databricks.com/t5/data-engineering/serverless-error-could-not-install-packages-due-to-an-oserror/m-p/118188#M45619</link>
      <description>&lt;P&gt;Thanks for clarifying Isi, really appreciate it&lt;/P&gt;</description>
      <pubDate>Wed, 07 May 2025 13:14:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/serverless-error-could-not-install-packages-due-to-an-oserror/m-p/118188#M45619</guid>
      <dc:creator>anmol-aidora</dc:creator>
      <dc:date>2025-05-07T13:14:49Z</dc:date>
    </item>
  </channel>
</rss>

