<?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 Libraries in requirements file not installed when streamlit app is deployed in Generative AI</title>
    <link>https://community.databricks.com/t5/generative-ai/libraries-in-requirements-file-not-installed-when-streamlit-app/m-p/119359#M885</link>
    <description>&lt;P&gt;I deployed a streamlit app on Databricks cluster but the libraries in the requirments.txt file were not installed when the app is deployed. I'm getting this error when a function that uses OpenAI is called."&lt;SPAN class=""&gt;ImportError&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Could not import openai python package. Please install it with pip install openai."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Any help will be appreciated. Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 15 May 2025 15:31:13 GMT</pubDate>
    <dc:creator>data_scientist3</dc:creator>
    <dc:date>2025-05-15T15:31:13Z</dc:date>
    <item>
      <title>Libraries in requirements file not installed when streamlit app is deployed</title>
      <link>https://community.databricks.com/t5/generative-ai/libraries-in-requirements-file-not-installed-when-streamlit-app/m-p/119359#M885</link>
      <description>&lt;P&gt;I deployed a streamlit app on Databricks cluster but the libraries in the requirments.txt file were not installed when the app is deployed. I'm getting this error when a function that uses OpenAI is called."&lt;SPAN class=""&gt;ImportError&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Could not import openai python package. Please install it with pip install openai."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Any help will be appreciated. Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2025 15:31:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/generative-ai/libraries-in-requirements-file-not-installed-when-streamlit-app/m-p/119359#M885</guid>
      <dc:creator>data_scientist3</dc:creator>
      <dc:date>2025-05-15T15:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: Libraries in requirements file not installed when streamlit app is deployed</title>
      <link>https://community.databricks.com/t5/generative-ai/libraries-in-requirements-file-not-installed-when-streamlit-app/m-p/136604#M1305</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/91639"&gt;@data_scientist3&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Would you share how you deployed the Streamlit app (Databricks Apps vs running Streamlit from a notebook/job cluster) and your cluster’s Databricks Runtime version? That’ll help me tailor the exact steps to your setup.&lt;/P&gt;
&lt;H4 class="_7uu25p0 qt3gz9c _7pq7t612 heading4 _7uu25p1"&gt;Option 1: If you deployed a Databricks App (Streamlit app via Apps)&lt;/H4&gt;
&lt;UL class="qt3gz97 qt3gz92"&gt;
&lt;LI class="qt3gz9a"&gt;
&lt;P class="qt3gz91 paragraph"&gt;Ensure a &lt;STRONG&gt;requirements.txt&lt;/STRONG&gt; is included at the root of your app’s source code. Apps resolve dependencies from that file when the app is deployed; redeploy after updating it.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;H4 class="_7uu25p0 qt3gz9c _7pq7t612 heading4 _7uu25p1"&gt;Option 2: Install requirements.txt to the cluster (workspace files)&lt;/H4&gt;
&lt;P class="qt3gz91 paragraph"&gt;If your requirements.txt is in the Databricks workspace, install it as a cluster library:&lt;/P&gt;
&lt;UL class="qt3gz97 qt3gz92"&gt;
&lt;LI class="qt3gz9a"&gt;
&lt;P class="qt3gz91 paragraph"&gt;Upload or locate the requirements.txt in Workspace files (Workspace &amp;gt; Import).&lt;/P&gt;
&lt;/LI&gt;
&lt;LI class="qt3gz9a"&gt;
&lt;P class="qt3gz91 paragraph"&gt;Compute &amp;gt; your cluster &amp;gt; Libraries &amp;gt; Install new &amp;gt; Source: Workspace &amp;gt; select the requirements.txt path and Install.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI class="qt3gz9a"&gt;
&lt;P class="qt3gz91 paragraph"&gt;Requirements-file installs are supported in Databricks Runtime 15.0+ (for workspace files). If you’re on an older runtime, use PyPI or volumes instead.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;H4 class="_7uu25p0 qt3gz9c _7pq7t612 heading4 _7uu25p1"&gt;Option 3: Install directly from PyPI to the cluster&lt;/H4&gt;
&lt;P class="qt3gz91 paragraph"&gt;If you just need OpenAI, install it from PyPI:&lt;/P&gt;
&lt;UL class="qt3gz97 qt3gz92"&gt;
&lt;LI class="qt3gz9a"&gt;Compute &amp;gt; your cluster &amp;gt; Libraries &amp;gt; Install new &amp;gt; Source: PyPI &amp;gt; Package: openai==1.55.3 (or your required version) &amp;gt; Install&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 29 Oct 2025 18:44:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/generative-ai/libraries-in-requirements-file-not-installed-when-streamlit-app/m-p/136604#M1305</guid>
      <dc:creator>stbjelcevic</dc:creator>
      <dc:date>2025-10-29T18:44:55Z</dc:date>
    </item>
  </channel>
</rss>

