tensorboard 报错 multiprocessing.SemLock._rebuild(*state) FileNotFoundError: [Errno 2] No such file or directory
时间: 2023-10-20 14:27:34 浏览: 472
tensorboard报错multiprocessing.SemLock._rebuild(*state) FileNotFoundError: [Errno 2] No such file or directory是由于在运行tensorboard时使用了多进程,而在多进程中调用了_semlock模块,但找不到相应的文件或目录引起的。这个问题在Mac系统上也会出现。解决这个问题的方法是在代码中加入以下操作:[3]
1. 在代码中导入必要的模块:from multiprocessing import Process, Queue, set_start_method, get_context
2. 设置启动方法为fork:set_start_method('fork')
通过这两个步骤,你可以解决tensorboard报错multiprocessing.SemLock._rebuild(*state) FileNotFoundError: [Errno 2] No such file or directory的问题,并确保在Mac系统中正常运行多进程程序。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [self._semlock = _multiprocessing.SemLock._rebuild(*state) FileNotFoundError: [Errno 2] No such file](https://blog.csdn.net/DL_Iris/article/details/123908700)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [self._semlock = _multiprocessing.SemLock._rebuild(*state) FileNotFoundError](https://blog.csdn.net/weixin_45592364/article/details/126464756)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文