<?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: Getting Py4J &amp;quot;Could not find py4j jar&amp;quot; error when trying to use pypmml, solution doesn't work in Machine Learning</title>
    <link>https://community.databricks.com/t5/machine-learning/getting-py4j-quot-could-not-find-py4j-jar-quot-error-when-trying/m-p/21581#M1187</link>
    <description>&lt;P&gt;I've been struggling myslef with it, but after installing pypmml for spark, I can use the other library, maybe it will work for you:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;runtime 10.4 LTS ML&lt;/LI&gt;&lt;LI&gt;install pypmml-spark (https://github.com/autodeployai/pypmml-spark)&lt;/LI&gt;&lt;LI&gt;install pmml4s-spark (org.pmml4s:pmml4s-spark_2.12:0.9.16, pyspark is eventually using it, &lt;A href="https://github.com/autodeployai/pmml4s-spark)" target="test_blank"&gt;https://github.com/autodeployai/pmml4s-spark)&lt;/A&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;both pyspark &amp;amp; scala works&lt;/P&gt;</description>
    <pubDate>Tue, 02 Aug 2022 15:47:37 GMT</pubDate>
    <dc:creator>pawelmitrus</dc:creator>
    <dc:date>2022-08-02T15:47:37Z</dc:date>
    <item>
      <title>Getting Py4J "Could not find py4j jar" error when trying to use pypmml, solution doesn't work</title>
      <link>https://community.databricks.com/t5/machine-learning/getting-py4j-quot-could-not-find-py4j-jar-quot-error-when-trying/m-p/21577#M1183</link>
      <description>&lt;P&gt;I'm trying to use pypmml in a DB notebook, but I'm getting the known `Error : Py4JError: Could not find py4j jar at` error. I've followed the solution here: &lt;A href="https://kb.databricks.com/libraries/pypmml-fail-find-py4j-jar.html?_ga=2.175359718.592963127.1651534726-1533525183.1615913382" alt="https://kb.databricks.com/libraries/pypmml-fail-find-py4j-jar.html?_ga=2.175359718.592963127.1651534726-1533525183.1615913382" target="_blank"&gt;https://kb.databricks.com/libraries/pypmml-fail-find-py4j-jar.html&lt;/A&gt;. However, this has not worked for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Details:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;When I run `%pip install py4j==0.10.9` followed by `%sh find /databricks/ -name "py4j*jar"`, no results are found. However, if I install to the cluster via the Compute UI, then I do find the jar in the expected path.&lt;/LI&gt;&lt;LI&gt;I move the jar via:&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;CODE&gt;dbutils.fs.cp('/databricks/python3/share/py4j/py4j0.10.9.jar', '/py4j/')&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I create the init script, like so:&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;CODE&gt;dbutils.fs.put("/&amp;lt;my-path&amp;gt;/install-py4j-jar.sh", """
&amp;nbsp;
#!/bin/bash
mkdir -p /share/py4j/ /current-release/
cp /dbfs/py4j/py4j0.10.9.jar /share/py4j/
cp /dbfs/py4j/py4j0.10.9.jar /current-release
""", True)&lt;/CODE&gt;&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;I attach init script, and restart.&lt;/LI&gt;&lt;LI&gt;I install pypmml and run something like:&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;CODE&gt;from pypmml import Model
model = Model.load('/dbfs/&amp;lt;my-path&amp;gt;/&amp;lt;my-model&amp;gt;.pmml')&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I've tried installing pypmml using %pip as well as in the cluster UI. &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No matter what, I always get the same error: Py4JError: Could not find py4j jar at &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using DRV 10.4 LTS ML, though I've tried other versions to no avail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 00:45:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/getting-py4j-quot-could-not-find-py4j-jar-quot-error-when-trying/m-p/21577#M1183</guid>
      <dc:creator>mattsteinpreis</dc:creator>
      <dc:date>2022-05-03T00:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Py4J "Could not find py4j jar" error when trying to use pypmml, solution doesn't work</title>
      <link>https://community.databricks.com/t5/machine-learning/getting-py4j-quot-could-not-find-py4j-jar-quot-error-when-trying/m-p/21578#M1184</link>
      <description>&lt;P&gt;To avoid conflict with preinstalled version, py4j needs to be installed via %pip install py4j==0.10.9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can try this way to check where it is installed:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;%sh
pip install py4j==0.10.9
pip show py4j&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 14:09:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/getting-py4j-quot-could-not-find-py4j-jar-quot-error-when-trying/m-p/21578#M1184</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-05-03T14:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Py4J "Could not find py4j jar" error when trying to use pypmml, solution doesn't work</title>
      <link>https://community.databricks.com/t5/machine-learning/getting-py4j-quot-could-not-find-py4j-jar-quot-error-when-trying/m-p/21579#M1185</link>
      <description>&lt;P&gt;This didn't fix the problem.&lt;/P&gt;&lt;P&gt;When I do this, pypmml does "see" this version, as when I later install pypmml, it skips the py4j requirement install and cites the py4j location from the show command. However, I still get the same error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know how to make pypmml know where to look to find the right py4j jar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, even when I install py4j in this way, the databricks environment still seems to point to a different py4j install. If I run:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;import py4j
print(py4j.__version__)
print(py4j.__file__)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get a different version and path than what was specified/returned from the install commands.&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 16:02:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/getting-py4j-quot-could-not-find-py4j-jar-quot-error-when-trying/m-p/21579#M1185</guid>
      <dc:creator>mattsteinpreis</dc:creator>
      <dc:date>2022-05-03T16:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Py4J "Could not find py4j jar" error when trying to use pypmml, solution doesn't work</title>
      <link>https://community.databricks.com/t5/machine-learning/getting-py4j-quot-could-not-find-py4j-jar-quot-error-when-trying/m-p/21580#M1186</link>
      <description>&lt;P&gt;Hi @Matthew Steinpreis​,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a friendly follow-up. Are you still looking for help? please let us know&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 00:22:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/getting-py4j-quot-could-not-find-py4j-jar-quot-error-when-trying/m-p/21580#M1186</guid>
      <dc:creator>jose_gonzalez</dc:creator>
      <dc:date>2022-07-29T00:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Py4J "Could not find py4j jar" error when trying to use pypmml, solution doesn't work</title>
      <link>https://community.databricks.com/t5/machine-learning/getting-py4j-quot-could-not-find-py4j-jar-quot-error-when-trying/m-p/21581#M1187</link>
      <description>&lt;P&gt;I've been struggling myslef with it, but after installing pypmml for spark, I can use the other library, maybe it will work for you:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;runtime 10.4 LTS ML&lt;/LI&gt;&lt;LI&gt;install pypmml-spark (https://github.com/autodeployai/pypmml-spark)&lt;/LI&gt;&lt;LI&gt;install pmml4s-spark (org.pmml4s:pmml4s-spark_2.12:0.9.16, pyspark is eventually using it, &lt;A href="https://github.com/autodeployai/pmml4s-spark)" target="test_blank"&gt;https://github.com/autodeployai/pmml4s-spark)&lt;/A&gt; &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;both pyspark &amp;amp; scala works&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 15:47:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/getting-py4j-quot-could-not-find-py4j-jar-quot-error-when-trying/m-p/21581#M1187</guid>
      <dc:creator>pawelmitrus</dc:creator>
      <dc:date>2022-08-02T15:47:37Z</dc:date>
    </item>
  </channel>
</rss>

