pythonprofilers / memory_profiler

Monitor Memory usage of Python code
http://pypi.python.org/pypi/memory_profiler
Other
4.39k stars 380 forks source link

NameError: name 'profile' is not defined #344

Closed cauliyang closed 2 years ago

cauliyang commented 2 years ago

Device: x86_64 GNU/Linux ENV: conda env Python: 3.8

Error: NameError: name 'profile' is not defined

Command used:

  1. mprof run --python python script.py
  2. python -m memory_profiler script.py
  3. mprof run script.py

Note:

I also run line_profiler, and it works better. However, for memory_profiler I get this error.

If you need any information please let me know!

Thanks for your time ^^

cauliyang commented 2 years ago

Fixed

Reason: name of script cannot be profile.py