<?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: !pip install vs. dbutils.library.installPyPI() in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/pip-install-vs-dbutils-library-installpypi/m-p/27189#M19069</link>
    <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Further, I found that dbutils.library.installPyPI is supported for LTS 5.5 DB version. In my case, I had some PyPI packages which I had installed at cluster level. I removed those cluster level PyPI packages and used dbutils.library.installPyPI to install notebook scoped packages. It works fine now.&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 07 May 2020 15:25:47 GMT</pubDate>
    <dc:creator>eishbis</dc:creator>
    <dc:date>2020-05-07T15:25:47Z</dc:date>
    <item>
      <title>!pip install vs. dbutils.library.installPyPI()</title>
      <link>https://community.databricks.com/t5/data-engineering/pip-install-vs-dbutils-library-installpypi/m-p/27187#M19067</link>
      <description>&lt;P&gt; Hello,&lt;/P&gt;&lt;P&gt; &lt;B&gt;Scenario:&lt;/B&gt;&lt;/P&gt;&lt;P&gt; &lt;B&gt;Trying to install some python modules into a notebook (scoped to just the notebook) using...&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;```&lt;/B&gt;&lt;/P&gt;&lt;P&gt; dbutils.library.installPyPI("azure-identity")&lt;/P&gt;&lt;P&gt; dbutils.library.installPyPI("azure-storage-blob")&lt;/P&gt;&lt;P&gt; dbutils.library.restartPython()&lt;/P&gt;&lt;P&gt;&lt;B&gt;```&lt;/B&gt;&lt;/P&gt;&lt;P&gt; &lt;B&gt;...getting the (unclear) error...&lt;/B&gt;&lt;/P&gt;&lt;P&gt; ```&lt;/P&gt;&lt;P&gt; org.apache.spark.SparkException: Process List(/local_disk0/pythonVirtualEnvDirs/virtualEnv-34b93f38-5a4f-41eb-a754-f16697cd339c/bin/python, /local_disk0/pythonVirtualEnvDirs/virtualEnv-34b93f38-5a4f-41eb-a754-f16697cd339c/bin/pip, install, azure-storage-blob==12.0.0, --disable-pip-version-check) exited with code 1. Traceback (most recent call last):&lt;/P&gt;&lt;P&gt; --------------------------------------------------------------------------- Py4JJavaError Traceback (most recent call last) &amp;lt;command-3781868905499817&amp;gt; in &amp;lt;module&amp;gt;() 1 dbutils.library.installPyPI("azure-identity") ----&amp;gt; 2dbutils.library.installPyPI("azure-storage-blob", version="12.0.0") 3 dbutils.library.restartPython()&lt;/P&gt;&lt;P&gt; /local_disk0/tmp/1587770610080-0/dbutils.py in installPyPI(self, project, version, repo, extras) 237 def installPyPI(self, project, version = "", repo = "", extras = ""): 238 return self.print_and_return(self.entry_point.getSharedDriverContext() \ --&amp;gt; 239 .addIsolatedPyPILibrary(project, version, repo, extras)) 240 241 def restartPython(self):&lt;/P&gt;&lt;P&gt; /databricks/spark/python/lib/py4j-0.10.7-src.zip/py4j/java_gateway.py in &lt;B&gt;call&lt;/B&gt;(self, *args) 1255 answer = self.gateway_client.send_command(command) 1256 return_value = get_return_value( -&amp;gt; 1257 answer, self.gateway_client, self.target_id, &lt;A href="http://self.name" alt="http://self.name" target="_blank"&gt;self.name&lt;/A&gt;) 1258 1259 for temp_arg in temp_args:&lt;/P&gt;&lt;P&gt; ```&lt;/P&gt;&lt;P&gt;&lt;B&gt;Whereas &lt;/B&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;!pip install -U azure-storage-blob&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;B&gt; seems to work just fine.&lt;/B&gt; &lt;B&gt;Questions:&lt;/B&gt;&lt;/P&gt;&lt;P&gt; 1. Why is this?&lt;/P&gt;&lt;P&gt; 2. At what scope does &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;!pip install&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; install python modules? - Notebook scope&lt;/P&gt;&lt;P&gt; - Library&lt;/P&gt;&lt;P&gt; - Cluster&lt;/P&gt;&lt;P&gt;&lt;B&gt; Thank you!&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 23:44:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/pip-install-vs-dbutils-library-installpypi/m-p/27187#M19067</guid>
      <dc:creator>EricThomas</dc:creator>
      <dc:date>2020-04-24T23:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: !pip install vs. dbutils.library.installPyPI()</title>
      <link>https://community.databricks.com/t5/data-engineering/pip-install-vs-dbutils-library-installpypi/m-p/27188#M19068</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hi &lt;A href="https://users/41860/ericonline.html" target="_blank"&gt;@ericOnline&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I also faced the same issue and I eventually found that upgrading the databricks runtime version from my current "5.5 LTS (includes Apache Spark 2.4.3, Scala 2.11)" to "6.5(Scala 2.11,Spark 2.4.5) resolved this issue.&lt;/P&gt;
&lt;P&gt;Though the official documentation says that dbutils.library.installPyPI is supported after runtime version 5.1 but that does not seem to be the case here.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Ishan&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2020 03:13:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/pip-install-vs-dbutils-library-installpypi/m-p/27188#M19068</guid>
      <dc:creator>eishbis</dc:creator>
      <dc:date>2020-04-28T03:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: !pip install vs. dbutils.library.installPyPI()</title>
      <link>https://community.databricks.com/t5/data-engineering/pip-install-vs-dbutils-library-installpypi/m-p/27189#M19069</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Further, I found that dbutils.library.installPyPI is supported for LTS 5.5 DB version. In my case, I had some PyPI packages which I had installed at cluster level. I removed those cluster level PyPI packages and used dbutils.library.installPyPI to install notebook scoped packages. It works fine now.&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 15:25:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/pip-install-vs-dbutils-library-installpypi/m-p/27189#M19069</guid>
      <dc:creator>eishbis</dc:creator>
      <dc:date>2020-05-07T15:25:47Z</dc:date>
    </item>
  </channel>
</rss>

