Python3 多线程问题:ModuleNotFoundError: No module named 'thread',原因及解决办法。

python3 导入thread报错,把thread改为_thread就好了。

报错信息:

Traceback (most recent call last):
File "test.py", line 1, in <module>
import thread
ModuleNotFoundError: No module named 'thread'

Traceback (most recent call last):
File "test.py", line 1, in <module>
import thread
ModuleNotFoundError: No module named 'thread'


import _thread

 

posted @ 2021-12-12 12:29  gbc  阅读(33)  评论(0)    收藏  举报