My system (Fedora 36) has Python3.10 by default which the pyspark action plugin is utilizing.
However, due to updates in this new version of python, collections package has been affected.
When I try to run the default code in Pyspark plugin, i.e:
from pyspark import *
from pyspark.sql import *
from cdap.pyspark import SparkExecutionContext
sec = SparkExecutionContext()
sc = SparkContext()
I get the error :
ImportError: cannot import name 'MutableMapping' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)
(I have attached the log from this error below)
If I try to correct that by importing packages as a workaround, I get stuck at:
ImportError: cannot import name 'Sequence' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)
I have installed Python3.9 and wanted to direct the python path to this in cdap.
How could I direct the Python path to 3.9 version?
Thank you