IPython installation

The recommended method to install IPython would be to use a third-party package such as Continuum's Anaconda or Enthought Canopy.

Linux

Assuming that pandas and other tools for scientific computing have been installed as per the instructions, the following one-line commands should suffice:

For Ubuntu/Debian, use

sudo apt-get install ipython-notebook

For Fedora, use

sudo yum install python-ipython-notebook

If you have pip and setuptools installed, you can also install it via the following command for Linux/Mac platforms:

sudo pip install ipython

Windows

IPython requires setuptools on Windows, and the PyReadline library. PyReadline is a Python implementation of the GNU readline library. To install IPython on Windows, perform the following steps:

  1. Install setuptools as detailed in the preceding section.
  2. Install pyreadline by downloading the MS Windows installer from PyPI Readline package page at https://pypi.python.org/pypi/pyreadline.
  3. Download and run the IPython Installer from the GitHub IPython download location: https://github.com/ipython/ipython/downloads.

For more information, see the IPython installation page at http://bit.ly/1MkCZhC.

Mac OS X

IPython can be installed on Mac OS X by using pip or setuptools. It also needs the readline and zeromq library, which are best installed by using Homebrew. The steps are as follows:

brew install readline
brew install zeromq
pip install ipython pyzmq tornado pygments

The pyzmq, tornado, and pygments modules are necessary to obtain the full graphical functionality of IPython Notebook. For more information, see the documentation titled Setup IPython Notebook and Pandas for OSX at http://bit.ly/1JG0wKA.

Install via Anaconda (for Linux/Mac OS X)

Assuming that Anaconda is already installed, simply run the following commands to update IPython to the latest version:

conda update conda
conda update ipython

Wakari by Continuum Analytics

If the user is not quite ready to install IPython, an alternative would be to use IPython in the cloud. Enter Wakari, a cloud-based analytics solution that provides full support for IPython notebooks hosted on Continuum's servers. It allows the user to create, edit, save, and share IPython notebooks all within a browser on the cloud. More details can be found at http://continuum.io/wakari.

Virtualenv

Virtualenv is a tool that is used to create isolated Python environments. It can be useful if you wish to work in an environment to test out the latest version of pandas without affecting the standard Python build.

Virtualenv installation and usage

I would only recommend installing Virtualenv if you decide not to install and use the Anaconda package, as this already provides the Virtualenv functionality. The brief steps are as follows:

  1. Install via pip:
    pip install virtualenv
    
  2. Use of Virtualenv
    • Create a virtual environment by using the following command:
      	virtualenv newEnv
      
    • Activate the virtual environment by using the following command:
      	source newEnv/bin/activate
      
    • Deactivate the virtual environment and go back to the standard Python environment by using the following command:
      	deactivate
      

For more information on this, you can go through the documentation titled Virtual Environments at http://docs.python-guide.org/en/latest/dev/virtualenvs/.

Tip

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can also download the code from the GitHub repository at: https://github.com/femibyte/mastering_pandas

..................Content has been hidden....................

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