I have to sudo the install commands because the makers of these libraries seem to think Python is installed in ~/Library but in fact it is in /Library, probably due to a mistake on my part. The mistake necessitated a little editing in the pydistutils.cfg file to remove the tilde.
The file ~/.pydistutils.cfg
[install] install_lib = /Library/Python/$py_version_short/site-packages install_scripts = ~/bin
[~] sudo easy_install ipython[zmq,test] [~] cd /Library/Python/2.7/site-packages/ [site-packages] sudo easy_install sympy [site-packages] cd /System/Library/Frameworks/Python.framework/Versions/2.7/extras [extras] sudo easy_install readline
In [1]: %logstart In [2]: from sympy import * In [3]: from sympy.matrices import Matrix In [6]: B = Matrix(2, 3, [1, 2, 3, 4, 5, 6]) In [7]: B Out[7]: [1, 2, 3] [4, 5, 6] In [12]: C = Matrix(3, 2, [1, 2, 3, 4, 5, 6]) In [13]: C Out[13]: [1, 2] [3, 4] [5, 6] In [14]: B * C Out[14]: [22, 28] [49, 64]