In WSL(Windows Subsystem Linux. it is just linux), this package works well.
But in Just normal windows, the simple code below is not run well but wait forever.
and terminal shows lot of errors about multiprocessing.
import numpy as np
from parallelplot import parallel_plot
def scatter(data, fig, axes):
axes.scatter(data[:, 0], data[:, 1])
X = np.random.uniform(low=-1, high=1, size=(5, 50, 50))
parallel_plot(plot_fn=scatter, data=X, grid_shape=(1, 5), show_progress=False )
Process SpawnPoolWorker-3:
Traceback (most recent call last):
File "\Python310\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
File "\Python310\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "\Python310\lib\multiprocessing\pool.py", line 114, in worker
task = get()
File "\Python310\lib\multiprocessing\queues.py", line 367, in get
return _ForkingPickler.loads(res)
AttributeError: Can't get attribute 'scatter' on <module '__main__' (built-in)>
Process SpawnPoolWorker-1:
Traceback (most recent call last):
File "\Python310\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
File "\Python310\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "\Python310\lib\multiprocessing\pool.py", line 114, in worker
task = get()
File "\Python310\lib\multiprocessing\queues.py", line 367, in get
return _ForkingPickler.loads(res)
AttributeError: Can't get attribute 'scatter' on <module '__main__' (built-in)>
Process SpawnPoolWorker-2:
Process SpawnPoolWorker-4:
Process SpawnPoolWorker-5:
Traceback (most recent call last):
File "\Python310\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
File "\Python310\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "\Python310\lib\multiprocessing\pool.py", line 114, in worker
task = get()
Traceback (most recent call last):
File "\Python310\lib\multiprocessing\queues.py", line 367, in get
return _ForkingPickler.loads(res)
File "\Python310\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
AttributeError: Can't get attribute 'scatter' on <module '__main__' (built-in)>
File "\Python310\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
Traceback (most recent call last):
File "\Python310\lib\multiprocessing\pool.py", line 114, in worker
task = get()
File "\Python310\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
File "\Python310\lib\multiprocessing\queues.py", line 367, in get
return _ForkingPickler.loads(res)
AttributeError: Can't get attribute 'scatter' on <module '__main__' (built-in)>
File "\Python310\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "\Python310\lib\multiprocessing\pool.py", line 114, in worker
task = get()
File "\Python310\lib\multiprocessing\queues.py", line 367, in get
return _ForkingPickler.loads(res)
AttributeError: Can't get attribute 'scatter' on <module '__main__' (built-in)>