I am having an issue with Google Cloud Dataproc with the structuring of my python project. I have a number of files which are all in the same folders and which call one another through import
. The overall program runs fine locally.
However, when I place it in Google Cloud Dataproc, I have an issue with import
. I have tried the answers presented in this Python can't find my module answer but to no effect.
The error is the following:
from model import PolicyEmergence
ImportError: No module named model
I tried to force the path using sys.path.insert(0, 'gs://bucket-name/')
but to no avail. I am not sure if this is due to the changing path every time I run the job.
Any help would be welcome, thanks.