rkern / line_profiler

(OLD REPO) Line-by-line profiling for Python - Current repo ->
https://github.com/pyutils/line_profiler
Other
3.6k stars 254 forks source link

kernprof.py: command not found #52

Closed ghost closed 8 years ago

ghost commented 8 years ago

I installed line_profiler with "pip install line_profiler" command, and tried to use it by calling "kernprof.py -l -v MYFILE.py". I then got an error "-bash: kernprof.py: command not found".

I located kernprof.py at ~/anaconda/lib/python2.7/site-packages/ so I don't know why the command is not found. I couldn't find the answer from either stack overflow or the close issues here. Does anyone know what is the problem?

rkern commented 8 years ago

It's just kernprof now. I'll fix the docs.

ghost commented 8 years ago

Got it. Thanks!

yleng commented 7 years ago

I used kernprof ( kernprof python example.py) but this is what I got: kernprof: command not found

What should I do? Thanks:)

juancresc commented 6 years ago

I have the same issue, so I'm running from the source code

daniellivingston commented 6 years ago

If you did a --user package installation, you can find kernprof with:

ls /Users/$(whoami)/Library/Python/2.7/lib/python/site-packages | grep kernprof

If you did a global installation, try:

ls /Library/Python/2.7/site-packages/ | grep kernprof

Then, to run line_profiler:

python "/Users/MyUserName/Library/Python/2.7/lib/python/site-packages/kernprof.py" -l -v script.py