ImportError:没有名为concurrent.futures.process的模块

Dur*_*esh 54 python path

我已经按照如何使用valgrind与python中给出的过程进行了操作用于检查我的python代码中的内存泄漏.

我在路径下有我的python源代码

/root/Test/ACD/atech
Run Code Online (Sandbox Code Playgroud)

我已经给出了上述路径PYTHONPATH.如果我使用默认的python二进制文件运行代码,一切正常/usr/bin/.我需要使用我手动构建的python二进制文件来运行代码

/home/abcd/workspace/python/bin/python
Run Code Online (Sandbox Code Playgroud)

然后我收到以下错误

from concurrent.futures.process import ProcessPoolExecutor
ImportError: No module named concurrent.futures.process
Run Code Online (Sandbox Code Playgroud)

我怎么解决这个问题?

Sam*_*zon 101

如果您使用的是Python 2.7,则必须安装此模块:

pip install futures
Run Code Online (Sandbox Code Playgroud)

期货功能从未包含在Python 2.x核心中.但是,它自Python 3.2以来就出现在Python 3.x中.