Just use pip:
pip install line_profiler
It is easier to use conda since it does not require building the package:
# if you use pip on Windows, you must have Visual Studio to build the package. conda install line_profiler
How to profile?
Annotate the function we want to profile with
@profile annotation. On the
command line, run:
kernprof -v -l test_script.py
The command line options to
test_script.py can be followed after it. Just like
- How can I profile Python code line-by-line?
License CC BY-NC-ND 4.0