Install Matplotlib 1.2.x On Os X Lion 10.7.4 And Python 3.2.2
Solution 1:
Okay...I think have managed to get matplotlib to install now...
First of all you need to install numpy. I have instructions to do this on another post: install numpy
Now open Terminal and clone the git repository for matplotlib (assumes you have git installed):
git clone git://github.com/matplotlib/matplotlib.git
(this might take a while)
Once the clone is complete open your user folder in Finder
In your user folder open the matplotlib directory
There is a file called `make.osx' open this with TextEdit (or similar)
Change the following lines:
MACOSX_DEPLOYMENT_TARGET=10.6
OSX_SDK_VER=10.6
To:
MACOSX_DEPLOYMENT_TARGET=10.7
OSX_SDK_VER=10.7
Change the following lines:
${PYTHON} -c 'import urllib; urllib.urlretrieve("${ZLIBURL}", "${ZLIBFILE}")' &&\ ${PYTHON} -c 'import urllib; urllib.urlretrieve("${PNGURL}", "${PNGFILE}")' &&\ ${PYTHON} -c 'import urllib; urllib.urlretrieve("${FREETYPEURL}", "${FREETYPEFILE}")'
To:
${PYTHON} -c 'import urllib.request; urllib.request.urlretrieve("${ZLIBURL}", "${ZLIBFILE}")' &&\ ${PYTHON} -c 'import urllib.request; urllib.request.urlretrieve("${PNGURL}", "${PNGFILE}")' &&\ ${PYTHON} -c 'import urllib.request; urllib.request.urlretrieve("${FREETYPEURL}", "${FREETYPEFILE}")'
Save the changes
Open the file called
setupext.py
in idleFind the line
'darwin' : [],
and change it to'darwin' : ['/usr/local'],
Save the file
Open Terminal again and type the following:
sudo make -f make.osx PREFIX=/usr/local PYVERSION=3.2 fetch deps mpl_build mpl_install
After some time matplotlib should be installed in the following directory:
/usr/local/lib/Python3.2/site-packages/
Open the above directory and also the following directory:
/Library/Python/3.2/site-packages/
Copy/move the following directories from
/usr/local/lib/Python3.2/site-packages/
to/Library/Python/3.2/site-packages/
:dateutil
matplotlib
mpl_toolkits
matplotlib should be now installed
If you open idle and type
import matplotlib
it shouldn't return an errorI tried out the
matplotlib/examples/user_interfaces/embedding_in_qt4_wtoolbar.py
file and it seems works fine
Hope someone else finds this useful!
Thanks again for the assistance,
Adam.
Post a Comment for "Install Matplotlib 1.2.x On Os X Lion 10.7.4 And Python 3.2.2"