Support Questions

Find answers, ask questions, and share your expertise

Unable to import pyspark script for my into python script

avatar
New Contributor

Hi All,

 

I have pyspark script(p1) which have dataframes created and returns dataframe. the same is being imported into different python script(p2). when i run p1 directly script executes successfully however when i run p2 it failes saying "no module found p1". I have import p1 into p2 script.

 

Please advise.

2 REPLIES 2

avatar
Master Collaborator

Did you follow the naming conventions for python modules specified in Python documentation? Is your module p1 in the same folder as module p2? 

avatar
New Contributor

Yes They both are in same folder.

 

Just to let you know, scripts works if we do not have Spark commands in script which is being imported to other script. So it looks like i am missing something to include.