2
,同时试图使用bash /激活,我不能运行任何默认的测试码无法在python虚拟环境中导入runpy模块
python -m memory_profiler test/test_as.py
Could not import runpy module
,而它运行在细运行在虚拟环境中内存分析器(https://pypi.python.org/pypi/memory_profiler)另一个虚拟环境,
> 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安装或简单安装? 还是手动安装模块? 在此先感谢。
是,@Neil,我最终不得不做同样的。但想知道,在按照相同的步骤设置虚拟Env后,一个env可以找到它,另一个env可以找到... – 2016-10-31 18:38:02