memory_profiler

pip install memory_profiler
pip install psutil
python -m memory_profiler  script.py