I am having problems running a multi-process script when executed from the ArcGIS Pro application. The script works fine when invoked from the command line.
Here is sample code to reproduce the problem:
task = inputs
# do some work
if __name__ == "__main__":
# create pool
pool = multiprocessing.Pool(2)
This simple geo-processing script fails to execute when invoked from ArcGIS Pro. The following exception is reported:
_pickle.PicklingError: Can't pickle <function mp_process at 0x000001C5CD672510>: attribute lookup mp_process on __main__ failed.
I can run this script from the command line with no issues, but from ArcGIS Pro it throws this exception. Does anyone know if there is a way to implement multi-processing in ArcGIS Pro custom geoprocessing tools??