在尝试使用bash /activate在虚拟环境中运行内存分析器(https://pypi.python.org/pypi/memory_profiler)时,我无法运行任何默认测试代码
python -m memory_profiler test/test_as.py
Could not import runpy module虽然它在另一个虚拟环境中运行良好,
> python -m memory_profiler ./test/test_as.py
Filename: ./test/test_as.py
Line # Mem usage Increment Line Contents
================================================
3 9.199 MiB 0.000 MiB @profile
4 def f():
5 9.207 MiB 0.008 MiB o = math.sqrt(2013)
6 9.207 MiB 0.000 MiB return o如何导入runpy模块或使用pip或easy install安装它?或者手动安装模块?提前谢谢。
发布于 2016-03-09 18:32:31
删除环境并使用virtualenv创建一个新环境对我来说很有效...今天早上,当我碰到这个的时候,我找不到任何其他的解决方案
https://stackoverflow.com/questions/29357497
复制相似问题