Why not use the Matplotlib installer for OS X 10.6? You can find it here:
http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.3/
Johannes
I see. Did you try the .egg or the .dmg installer? If you tried the
.egg, try the .dmg instead. I just tried the .dmg and it worked fine
for me.
Maybe you should try to post your installation problem on the
Matplotlib mailing list?
Johannes
> hc
>
> On Jun 8, 12:34 pm, Johannes Ring <joha...@simula.no> wrote:
>> On Tue, Jun 8, 2010 at 6:20 PM, hc <hwan...@gmail.com> wrote:
>> > Hello:
>>
>> > I tried "Easy Install" to install Matplotlib on Mac OS Snow Leopard,
>> > but I failed. Before the installation of Matplotlib, I installed
>> > Xcode, Python, Numpy, Scipy, Gnuplot. For now, I have no problem using
>> > Gnuplot, Numpy, or Scipy from Python. Is there any effective way to
>> > put Matplotlab+SciTools to work? Can I go ahead to download and
>> > install the source files after my failure to make the binary copy work
>> > on my mac? Your advice will be highly appreciated
>>
>> Why not use the Matplotlib installer for OS X 10.6? You can find it here:
>>
>> http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotli...
>>
>> Johannes
>
> --
> You received this message because you are subscribed to the Google Groups "scitools" group.
> To post to this group, send email to scit...@googlegroups.com.
> To unsubscribe from this group, send email to scitools+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/scitools?hl=en.
>
>
OK. So what was the problem? No error messages?
> On the Terminal (mac os snow leopard), I got the error messages are:
>
> ----------------------------------------------------------
> Last login: Tue Jun 8 16:24:19 on ttys000
> hc-MacBook-Pro:~ hc$ > python -c 'import matplotlib; print
> matplotlib.__version__, matplotlib.__file__'
> -bash: -c: command not found
> hc-MacBook-Pro:~ hc$
> ---------------------------------------------------------
This looks strange. Does this work
python -c 'import os'
or this
python -c "import os"
?
> One the Terminal (mac os snow leopard), I opened Python, entered
> "import pylab", and got the error messages:
> -----------------------------------------------------------------------------------------
> Last login: Tue Jun 8 16:15:19 on ttys000
> hc-MacBook-Pro:~ hc$ python
> Python 2.6.5 (r265:79359, Mar 24 2010, 01:32:55)
> [GCC 4.0.1 (Apple Inc. build 5493)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import pylab
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> ImportError: No module named pylab
>>>>
> ----------------------------------------------------------------------------------------
>
> I have not tried the .egg copy yet.
>
> Any clue?
Sorry, the dmg installer worked fine for me so I can't reproduce your
problem. You can try building Matplotlib from source. I have not tried
this myself on a Mac so I'm not sure how straightforward it is.
Anyway, you will probably get better support by asking at the
Matplotlib mailing list.
One can easily get several Python installations on a Mac. Can you do
unix> which python
in a terminal window?
And can you find Python installed in /Applications? Those might be
two different Pythons. The .dmg files normally install in /Applications,
while setup.py and .egg files normally go to the python executable
that you reach in the terminal window (the first python executable found
in a directory in your PATH variable).
On my Mac (Snow Leopard), I have three pythons:
/sw/bin/python (installed by fink)
/usr/bin/python (it probably came with the system)
/home/hpl/.../python (my own compiled latest version Python, this is the one I use)
You have to know which one you're using... It's my experience with Mac
that you need quite some Unix competence to manage software that
consists of many components and that comes from different
sources. That's why we recommend, in general, students to run Ubuntu
in a VirtualBox on the Mac and do Python programming in Ubuntu. It's
an order of magnitude simpler to install all the software you need in
Ubuntu (cf. apt-get install python-scitools :-)
But if you want to qualify for excellence in software build & install,
Mac is a wonderful training platform.
Hans Petter
$ which python
/usr/bin/python
$ python --version
Python 2.6.1
Try to import matplotlib with system Python. I get this:
$ /usr/bin/python -c "import matplotlib;print matplotlib"
<module 'matplotlib' from
'/Library/Python/2.6/site-packages/matplotlib/__init__.pyc'>
Johannes
For me it seems like you still have the system provided Python. It
also seems like Matplotlib is installed correctly telling from your
output above. If you don't want to use the system provided Python then
I guess the only option is to build Matplotlib from source. As I said,
I haven't tried this myself on a Mac, but it might be as simple as
"python setup.py build" and then (if everything went fine) "python
setup.py install".
Johannes