没有名为'concurrent.futures'的模块; 'concurrent'不是使用Python 3.6.0的包

dra*_*ram 2 python-3.x python-asyncio

当我在Mac OSX命令行上的python中执行以下操作时:

>>> from concurrent.futures import ProcessPoolExecutor
Run Code Online (Sandbox Code Playgroud)

我明白了

ModuleNotFoundError: No module named 'concurrent.futures'; 'concurrent' is not a package
Run Code Online (Sandbox Code Playgroud)

python --version使用Virtualenvs给人3.6.0,我已经做了pip3 install asyncio,也pip3 install futures.

Udi*_*Udi 13

你可能有一个concurrent.py在你的项目中命名的文件:-)

  • 太棒了:)!我也刚刚犯过同样的错误。 (2认同)