Dash with multiprocessing

Whenever I call a function that uses multiprocessing I get runtime error like this:

Runtime Error: No root path can be found for the provided module "__mp_main__". This can happen because 
the module came from an import hook that does not provide file name information or because it's a namespace 
package. In this case the root path needs to be explicitly provided.

I suppose it can be connected to the fact that there is no forking in windows (or not. I really know very little about it), but I have no idea what should be changed.
This function works fine when called from a simple script (with if __name__ == "__main__", of course), but this doesn’t help with dash.

Looking at this SO post, it looks like you could be right. It might have something to do with the way multiprocessing works in Windows, where the lack of forking means worker processes have to create a new process and re-import the parent module, but not using the value __main__. I can’t tell what that means for your app though. Perhaps a minimally reproducible example would help.

I started to write an example and, wonderfully, it worked. Trying to find the difference, I went through my code line by line to understand that this error is rising when I import some functions from scipy (i.e. scipy.optimize.brute or scipy.stats.norm). Other functions from other modules – fine. Some other functions from scipy (i.e. from scipy.fftpack) – fine, but these two caused this error.
In my case, I haven’t actually needed them that much, so I just dropped them and everything started to work perfectly.
But anyway, this behavior seems really strange. Maybe you have some idea why this happens?

I am getting the same error if I am using the following code
pool = Pool(cores)

In short my understanding is, if I am using parallel processing to process my dataframe, its throwing error, else its working fine.
Without this line, the code works perfectly. I am not able to figure out what is the issue.
Any help please!!!

I have the same problem. Any idea?