如果python中导入线程池的模块:from concurrent.futures import ThreadPoolExecutor,编译器会报提示说找不到模块。

其实python3标准库里包含concurrent模块,ThreadPoolExecutor在Thread.py中。

所以导入模块的方式为: from concurrent.futures.Thread import ThreadPoolExecutor

查看python标准库里的模块一种方式:

1、找到python的安装目录

python中ThreadPoolExecutor线程池的模块问题

2、打开Lib文件夹

python中ThreadPoolExecutor线程池的模块问题

3、右上角输入要查找的模块,会显示搜索结果。

python中ThreadPoolExecutor线程池的模块问题

 

相关文章:

  • 2022-12-23
  • 2021-04-26
  • 2021-12-27
  • 2021-08-18
  • 2021-04-11
猜你喜欢
  • 2022-12-23
  • 2023-03-20
  • 2022-12-23
  • 2021-04-12
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案