The recommended method to install IPython would be to use a third-party package such as Continuum's Anaconda or Enthought Canopy.
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
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:
setuptools
as detailed in the preceding section.pyreadline
by downloading the MS Windows installer from PyPI Readline package page at https://pypi.python.org/pypi/pyreadline.For more information, see the IPython installation page at http://bit.ly/1MkCZhC.
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.
Assuming that Anaconda is already installed, simply run the following commands to update IPython to the latest version:
conda update conda conda update ipython
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 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.
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:
pip
:pip install virtualenv
virtualenv newEnv
source newEnv/bin/activate
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/.
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