Getting an error from concurrent.futures when trying to run the 'Quick Start' example from the readme specifically on my M2 mac. The identical code raises no errors on Ubuntu 22.04 LTS. I get the same results across multiple major python versions. Any ideas for how to fix this?
/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/site-packages/genomicranges/SeqInfo.py:348: UserWarning: 'seqnames' is deprecated, use 'get_seqnames' instead
warn("'seqnames' is deprecated, use 'get_seqnames' instead", UserWarning)
/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/site-packages/biocframe/BiocFrame.py:833: UserWarning: This method performs an in-place operation, use 'set_column' instead
warn(
/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/site-packages/genomicranges/SeqInfo.py:348: UserWarning: 'seqnames' is deprecated, use 'get_seqnames' instead
warn("'seqnames' is deprecated, use 'get_seqnames' instead", UserWarning)
/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/site-packages/biocframe/BiocFrame.py:833: UserWarning: This method performs an in-place operation, use 'set_column' instead
warn(
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/multiprocessing/spawn.py", line 122, in spawn_main
exitcode = _main(fd, parent_sentinel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/multiprocessing/spawn.py", line 131, in _main
prepare(preparation_data)
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/multiprocessing/spawn.py", line 246, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/multiprocessing/spawn.py", line 297, in _fixup_main_from_path
main_content = runpy.run_path(main_path,
^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen runpy>", line 286, in run_path
File "<frozen runpy>", line 98, in _run_module_code
File "<frozen runpy>", line 88, in _run_code
File "/Users/griffen/scratch/scranpy/process.py", line 9, in <module>
results = scranpy.analyze_sce(sce, options=options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/site-packages/scranpy/analyze/analyze.py", line 209, in analyze_sce
return analyze_se(
^^^^^^^^^^^
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/site-packages/scranpy/analyze/analyze.py", line 132, in analyze_se
return analyze(
^^^^^^^^
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/site-packages/scranpy/analyze/analyze.py", line 70, in analyze
return live_analyze(
^^^^^^^^^^^^^
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/site-packages/scranpy/analyze/live_analyze.py", line 297, in live_analyze
get_tsne, get_umap, graph, remaining_threads = run_neighbor_suite(
^^^^^^^^^^^^^^^^^^^
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/site-packages/scranpy/analyze/run_neighbor_suite.py", line 100, in run_neighbor_suite
executor.submit(
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/concurrent/futures/process.py", line 835, in submit
self._adjust_process_count()
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/concurrent/futures/process.py", line 794, in _adjust_process_count
self._spawn_process()
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/concurrent/futures/process.py", line 812, in _spawn_process
p.start()
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
^^^^^^^^^^^^^^^^^
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/multiprocessing/context.py", line 289, in _Popen
return Popen(process_obj)
^^^^^^^^^^^^^^^^^^
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/multiprocessing/popen_spawn_posix.py", line 32, in __init__
super().__init__(process_obj)
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/multiprocessing/popen_spawn_posix.py", line 42, in _launch
prep_data = spawn.get_preparation_data(process_obj._name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/multiprocessing/spawn.py", line 164, in get_preparation_data
_check_not_importing_main()
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/multiprocessing/spawn.py", line 140, in _check_not_importing_main
raise RuntimeError('''
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if __name__ == '__main__':
freeze_support()
...
The "freeze_support()" line can be omitted if the program
is not going to be frozen to produce an executable.
To fix this issue, refer to the "Safe importing of main module"
section in https://docs.python.org/3/library/multiprocessing.html
Traceback (most recent call last):
File "/Users/griffen/scratch/scranpy/process.py", line 9, in <module>
results = scranpy.analyze_sce(sce, options=options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/site-packages/scranpy/analyze/analyze.py", line 209, in analyze_sce
return analyze_se(
^^^^^^^^^^^
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/site-packages/scranpy/analyze/analyze.py", line 132, in analyze_se
return analyze(
^^^^^^^^
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/site-packages/scranpy/analyze/analyze.py", line 70, in analyze
return live_analyze(
^^^^^^^^^^^^^
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/site-packages/scranpy/analyze/live_analyze.py", line 348, in live_analyze
results.tsne = get_tsne()
^^^^^^^^^^
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/site-packages/scranpy/analyze/run_neighbor_suite.py", line 125, in get_tsne
return _tasks[0].result()
^^^^^^^^^^^^^^^^^^
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/Users/griffen/mambaforge/envs/biocpy/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.