Moving to Python 3

The time has come. All the libraries I use on a regular basis are available for Python 3.4. I just spent a frighteningly short amount of time with [MacPorts][] installing everything I need and then making sure that Python 3.4 and iPython 3.4 are the defaults. Here’s all that I had to type:

% sudo port selfupdate
% sudo port install python34
% sudo port install py34-numpy
% sudo port install py34-scipy
% sudo port install py34-nltk
% sudo port install py34-pandas
% sudo port install ipython34
% sudo port select –set python python3
% sudo port select –set ipython ipython3

And then, because I’m working on something for [The Programming Historian][] and it’s just easier to do everything in an iPython notebook:

% ipython notebook

Later, all I will need to do is:

% ipython nbconvert –to markdown myFile.ipynb

[MacPorts]: https://www.macports.org
[The Programming Historian]: http://programminghistorian.org

Leave a Reply