I am using pathos multiprocessing to be able to process functions with multiple input variables of different types (numpy, gdal, lists, etc.). Problem is that my packages are not loaded when I implement my multi-core function. I know that this and this stack overflow questions are describing a similar issue. However, when I implement the solutions presented there the issue persists. Currently, multiprocessing with pathos only works when I load the packages in the function.
Do you have any idea how solve this problem?
import pathos.multiprocessing as pmp
import numpy as np
if __name__ == "__main__":
p = pmp.ProcessingPool(6)
NameError: global name 'np' is not defined