Open mmuuyyii opened 8 months ago
Hi mmuuyyii,
I suggest you run the statistical method in jupyter instead (following instructions in https://github.com/ventolab/CellphoneDB/blob/master/notebooks/T1_Method2.ipynb). However, if you prefer to play around with the code in PyCharm first I think you need to set threads=1 in cpdb_statistical_analysis_method.call(). That parameter defaults to 4 if not specified and this is I think what is causing your error. Please see https://stackoverflow.com/questions/74644040/pycharm-multiprocessing-error-what-can-i-do and https://youtrack.jetbrains.com/issue/PY-50116 for more information.
Hope that helps.
Best,
Robert.
Hi, I'm trying to run example data in db5.0 with PyCharm and python 3.11.7 as the notebook guides:
import cellphonedb import pandas as pd import sys import os
cpdb_file_path = 'cellphonedb.zip' meta_file_path = 'test_meta.txt' counts_file_path = 'test_counts.txt' # I also try h5ad from cellphonedb.src.core.methods import cpdb_statistical_analysis_method deconvoluted, means, pvalues, significant_means = cpdb_statistical_analysis_method.call( cpdb_file_path = cpdb_file_path, meta_file_path = meta_file_path, counts_file_path = counts_file_path, counts_data = 'ensembl', output_path = "cpdb")
When I run the code, the program goes to endless loop. When I debug the code, I get the error in "spawn.py":
def _check_not_importing_main(): if getattr(process.current_process(), '_inheriting', False): raise RuntimeError(''' An attempt has been made to start a new process before the current process has finished its bootstrapping phase.
Could you please teach me what should I do? Thanks a million.