<?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>question Re: Issue with spark-submit with different python version in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Issue-with-spark-submit-with-different-python-version/m-p/300281#M220124</link>
    <description>&lt;P&gt;Problem solved: the issue was related to topology.py which used python as a default interpreter which despite all env vars that are pointing to python3 was still resolved to python 2 so ended up overriding topology with path to python3&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jul 2020 01:17:46 GMT</pubDate>
    <dc:creator>denys_tyshetsky</dc:creator>
    <dc:date>2020-07-23T01:17:46Z</dc:date>
    <item>
      <title>Issue with spark-submit with different python version</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Issue-with-spark-submit-with-different-python-version/m-p/299979#M219969</link>
      <description>&lt;P&gt;We are doing spark-submit from airflow (added it as a custom parcel into CDP 7.1)&lt;/P&gt;&lt;P&gt;Airflow is built with python 3 however default python version on CDP is python2. As a result during spark-submit getting this issue:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;WARN net.ScriptBasedMapping: Exception running /etc/hadoop/conf.cloudera.yarn/topology.py 10.228.86.42
ExitCodeException exitCode=1:   File "/opt/cloudera/parcels/Airflow-1.10.10-python3.7.7_1.2.3/lib/python3.7/site.py", line 177
    file=sys.stderr)
        ^
SyntaxError: invalid syntax&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Added&amp;nbsp;&lt;SPAN&gt;PYSPARK_DRIVER_PYTHON and&amp;nbsp;PYSPARK_PYTHON to spark-defaults as well as spark-env.sh pointing to python3. Also added&amp;nbsp;spark.yarn.appMasterEnv.PYTHONHASHSEED = 0 however the problem remains. As soon as python version is being changed to python3 on the workers (basically the only available python becomes python 3) spark-submit starts working. I was wondering if there is something I am missing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2020 04:25:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Issue-with-spark-submit-with-different-python-version/m-p/299979#M219969</guid>
      <dc:creator>denys_tyshetsky</dc:creator>
      <dc:date>2020-07-20T04:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with spark-submit with different python version</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Issue-with-spark-submit-with-different-python-version/m-p/300281#M220124</link>
      <description>&lt;P&gt;Problem solved: the issue was related to topology.py which used python as a default interpreter which despite all env vars that are pointing to python3 was still resolved to python 2 so ended up overriding topology with path to python3&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 01:17:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Issue-with-spark-submit-with-different-python-version/m-p/300281#M220124</guid>
      <dc:creator>denys_tyshetsky</dc:creator>
      <dc:date>2020-07-23T01:17:46Z</dc:date>
    </item>
  </channel>
</rss>

