4

while trying to run memory profiler (https://pypi.python.org/pypi/memory_profiler) in virtual environment using bash /activate, I couldnt run any of the default test code

python -m memory_profiler test/test_as.py
Could not import runpy module

while it runs fine in another virtual env,

 > 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

How do I import the runpy module or install it using pip or easy install ? or do a manual installation of module? Thanks in advance.

ravi.zombie
  • 1,482
  • 1
  • 20
  • 23

1 Answers1

4

Deleting the environment and creating a new one with virtualenv worked for me ... I couldn't find any other solution when I hit this, this morning

Neil Gatenby
  • 419
  • 6
  • 21