So I've looked around everywhere for help on how to install cProfile and I've found nothing. When this usually happens I turn to pip and run the usual: 'pip install [module name]' but I'm getting the error: No matching distribution found for cprofile.
I have no idea how to install cProfile and I've looked everywhere. I rarely turn to StackOverflow and when I did I thoroughly searched it for a question like this.
Any help would be appreciated.
Shorthand question: How do I install cProfile?
Normally it is included in the Python's standard library. What Python version are you using? You can verify that with:
python -V
What pip version are you using? You can verify that with:
pip -V
and upgrade it with:
pip install -U pip
What is the output when you try to run cProfile in package mode directly through the bash, like:
python -m cProfile -o profile_output script.py
Morevover, the official documentation recommends using profile
if cProfile
is not available on your system, as they are mostly interchangeable. Please refer to The Python Profilers Official Documentation.