5) Canopy consists of major Python packages required for data analysis. If a package is not available in Canopy, IPython notebook will generate an error.
For e.g. Open IPython notebook and enter “import brewer2mpl”, then run the code. You will get an error stating that “module is not present”
6) To install a package that is not in Canopy. Go to command prompt and type “easy_installpackage name” (here we are installing brewer2mpl), then press enter.
A pop window will appear, you have to click yes. After the installation is over type “import brewer2mpl” in your Ipython notebook and run it. You won’t get an error this time. This shows that your package has been installed successfully.
Setting up Sublime text for Python development
1) Download sublime text 2. (Sublime text 3 is in beta version, so don’t install it)
3) Go to sublime text editor and click on view -> show console and paste the copied code. Press enter and restart sublime text.
4) Go to preferences -> click on package control -> type “install packages” -> type “sublime repl” -> select it. It will take some time to install sublime repl.
5) After the installation, Click on tools -> sublime repl -> Python -> IPython.
I prefer to work in two columns view, because you can write code in left column, and check output of the code in right column. Go to view and then in layout select two columns.
I also found this interesting video on how to install I python Notebook:
You can execute a program using build function (ctrl+B), or go to tools -> sublime repl-> Python-> run.
I also found an interesting video on how to install Ipython notebook:
Canopy also provides you a code editor with IPython Notebook Support. I rarely use sublime text for performing data analysis. I Python notebook is an awesome interactive environment. Use it and you will fall in love with it.
If you have any queries feel free to ask in comments.