Installing line_profiler

line_profiler was created by one of the NumPy developers. This module does line-by-line profiling of Python code. We will describe the necessary installation steps in this recipe.

Getting ready

You might need to install setuptools. This is covered in a previous recipe; refer to the See Also section if necessary. In order to install the development version, you will need Mercurial. Installing Mercurial is outside the scope of this book. Steps to install Mercurial can be found at http://mercurial.selenic.com/wiki/Download.

How to do it...

Choose the install option appropriate for you:

  • Install with easy_install.

    You can install line_profiler with easy_install by using any one of the following commands:

    easy_install line_profiler
    pip install line_profiler
    
  • Install development version.

    We can check out the source with Mercurial:

    $ hg clone https://bitbucket.org/robertkern/line_profiler
    

    After checking out the source, we can build it as follows:

    $ python setup.py install
    

See also

  • The Installing IPython recipe in Chapter 1, Winding Along with IPython
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset