I am able to generate *.dat file:
vikas@server:~/memory_profiler-0.36$ ./mprof run --python test_sl.py
vikas@server:~/memory_profiler-0.36$ ls *.dat
mprofil
I had same problem on freshely installed Ubuntu 16.04. To solve it, I have installed SciPy like this:
sudo pip install scipy
Also I had to install tkinter lib like this:
sudo apt-get install python-tk
I guess somewhere in the past, matplotlib had scipy as dependency, but now it only has numpy, while mprof plot requires scipy.