Dask.distributed创建client时出现报错
生活随笔
收集整理的這篇文章主要介紹了
Dask.distributed创建client时出现报错
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
在使用Dask創建一個Client的時候出現下面的報錯,具體的問題解決
RuntimeError: An attempt has been made to start a new process before thecurrent process has finished its bootstrapping phase.This probably means that you are not using fork to start yourchild processes and you have forgotten to use the proper idiomin the main module:if __name__ == '__main__':freeze_support()解決方法其實很簡單,就是將語句放到main函數中就好了~
比如下面的代碼是沒有類似的問題的~
from dask.distributed import Client if __name__ == '__main__':client = Client()總結
以上是生活随笔為你收集整理的Dask.distributed创建client时出现报错的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 解决方法WindowsError: [E
- 下一篇: [Dask使用实例]Dask简单计算实例