python 如何在python中运行并行作业
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1720603/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to run parallel job in python
提问by vernomcrp
I am doing a data mining project in Python, and during the experiment phase I have to run many experiments at the same time. How could I create n
processes, so that each process is dedicated to an experiment? Which module I should use?
我正在用 Python 做一个数据挖掘项目,在实验阶段我必须同时运行许多实验。我如何创建n
流程,以便每个流程都专用于一个实验?我应该使用哪个模块?
采纳答案by vernomcrp
Have a look at Does python support multiprocessor/multicore programming?
Then look at http://wiki.python.org/moin/ParallelProcessingfor more options
然后查看http://wiki.python.org/moin/ParallelProcessing以获取更多选项
but generally python multiprocessing(http://docs.python.org/library/multiprocessing.html) module will be enough
但通常 python multiprocessing( http://docs.python.org/library/multiprocessing.html) 模块就足够了
回答by P?r Wieslander
Have a look at the multiprocessingmodule.
看看多处理模块。