Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
NumPy Cookbook

You're reading from   NumPy Cookbook If you're a Python developer with basic NumPy skills, the 70+ recipes in this brilliant cookbook will boost your skills in no time. Learn to raise productivity levels and code faster and cleaner with the open source mathematical library.

Arrow left icon
Product type Paperback
Published in Oct 2012
Publisher Packt
ISBN-13 9781849518925
Length 226 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (17) Chapters Close

NumPy Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Winding Along with IPython 2. Advanced Indexing and Array Concepts FREE CHAPTER 3. Get to Grips with Commonly Used Functions 4. Connecting NumPy with the Rest of the World 5. Audio and Image Processing 6. Special Arrays and Universal Functions 7. Profiling and Debugging 8. Quality Assurance 9. Speed Up Code with Cython 10. Fun with Scikits Index

Installing IPython


IPython can be installed in various ways depending on your operating system. For the terminal-based shell, there is a dependency on readline. The web notebook requires tornado and zmq.

In addition to installing IPython, we will install setuptools, which gives you the easy_install command. The easy_install command is the default, standard package manager for Python. pip can be installed once you have easy_install available. The pip command is similar to easy_install, and adds options such as uninstalling.

How to do it...

This section describes how IPython can be installed on Windows, Mac OS X, and Linux. It also describes how to install IPython and its dependencies with easy_install and pip, or from source.

  • Installing IPython and setup tools on Windows: A binary Windows installer for Python 2 or Python 3 is available on the IPython website. Also see http://ipython.org/ipython-doc/stable/install/install.html#windows.

    Install setuptools with an installer from http://pypi.python.org/pypi/setuptools#files. Then install pip; for instance:

    cd C:\Python27\scripts
    python .\easy_install-27-script.py pip
    
  • Installing IPython On Mac OS X: Install the Apple Developer Tools (Xcode) if necessary. Xcode can be found on the OSX DVDs that came with your Mac or App Store. Follow the easy_install/pip instructions, or the installing from source instructions provided later in this section.

  • Installing IPython On Linux: Because there are so many Linux distributions, this section will not be exhaustive.

    • On Debian, type the following command:

      su – aptitude install ipython python-setuptools
      
    • On Fedora, the magic command is as follows:

      su – yum install ipython python-setuptools-devel
      
    • The following command will install IPython on Gentoo:

      su – emerge ipython
      
    • For Ubuntu, the install command is as follows:

      sudo apt-get install ipython python-setuptools
      
  • Installing IPython with easy_install or pip: Install IPython and all the dependencies required for the recipes in this chapter with easy_install, using the following command:

    easy_install ipython pyzmq tornado readline
    

    Alternatively, you can first install pip with easy_install, by typing the following command in your terminal:

    easy_install pip
    

    After that, install IPython using pip, with the following command:

    sudo pip install ipython pyzmq tornado readline
    
  • Installing from source: If you want to use the bleeding edge development version, then installing from source is for you.

    1. Download the latest tarball from https://github.com/ipython/ipython/downloads.

    2. Unpack the source code from the archive:

      tar xzf ipython-<version>.tar.gz
      
    3. If you have Git installed, you can clone the Git repository instead:

      $ git clone https://github.com/ipython/ipython.git
      
    4. Go to the ipython directory:

      cd ipython
      
    5. Run the setup script. This may require you to run the command with sudo, as follows:

      sudo setup.py install
      

How it works...

We installed IPython using several methods. Most of these methods install the latest stable release, except when you install from source, which will install the development version.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime