我正在阅读https://docs.python.org/3/library/concurrent.futures.html上的 Python 文档,我想使用此功能,但我不能。
第一步失败:导入模块。因为
import concurrent.futures
我得到
File "<stdin>", line 1, in <module>
File "/home/kevin/concurrent.py", line 3, in <module>
import concurrent.futures
ModuleNotFoundError: No module named 'concurrent.futures'; 'concurrent' is not a package
我也无法让 pip 找到或安装它,无论是“concurrent.futures”还是“concurrent”。
我目前使用 Xubuntu 22.04 LTS,运行 Python 3。