about installing matplotlib package

A forum for general discussion of the Python programming language.

about installing matplotlib package

Postby kingkamekameha » Tue Jan 07, 2014 4:20 pm

Hi there:

I am new to Python and I would like to install matplotlib on my Mac (10.7.5). When I download the matplotlib DMG package, it needs Python 2.7 to install. I notice that there are a few different versions of Python are on my mac, python2.5, python 2.6, python2.7 and python3.3. Because I did not know Mac comes with Python, I installed 3.3 on the machine. The thing I don't understand is that why matplotlib detects an older version of Python on my machine. How can I install this package? Many thanks.

Here is the summary of what I found.
1. At the Terminal prompt, when I type "python", I got
Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53)

2. my bash.profile has the following line
PATH="/Library/Frameworks/Python.framework/Versions/3.3/bin:${PATH}"
export PATH
** In order to run Python 3.3, I need to type "python3.3" at the prompt, not "python".

3. Under /System/Library/Frameworks/Python.framework/Versions
There are
drwxr-xr-x 7 root wheel 238 Oct 10 2011 .
drwxr-xr-x 6 root wheel 204 Sep 26 2012 ..
drwxr-xr-x 7 root wheel 238 Oct 10 2011 2.3
drwxr-xr-x 11 root wheel 374 Sep 26 2012 2.5
drwxr-xr-x 11 root wheel 374 Sep 26 2012 2.6
drwxr-xr-x 11 root wheel 374 Sep 26 2012 2.7
lrwxr-xr-x 1 root wheel 3 Oct 10 2011 Current -> 2.7
Last edited by stranac on Tue Jan 07, 2014 4:57 pm, edited 1 time in total.
Reason: First post lock.
kingkamekameha
 
Posts: 2
Joined: Tue Jan 07, 2014 4:00 pm

Re: about installing matplotlib package

Postby micseydel » Tue Jan 07, 2014 11:09 pm

Have you followed the instructions here? If so, what is your problem exactly? Give as much detail as possible, any errors, any deviation from the exact instructions* that could cause the problem.

* I mention this in case for some reason you couldn't follow the instructions, since if you can you should be. Especially if it isn't working.
Join the #python-forum IRC channel on irc.freenode.net!
User avatar
micseydel
 
Posts: 1115
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: about installing matplotlib package

Postby kingkamekameha » Wed Jan 08, 2014 8:38 pm

Yes, I follow the instruction from matplotlib to install it on a Mac using its released dmg file. The problem I encounter is that matplotlib does not know a version of Python met its requirement is already in the system. The error message is something like "matplotlib requires Python version 2.7" in the window.

I download v2.7.6 directly from Python's website and re-install it and modify the PATH in the .bash_profile. Hence, I totally ignored all those previous installed Python in my system. Now, matplotlib is happy now and installed successfully.

Although I solve my own problem, I would still like to know why matplotlib thinks I have an older version of Python in my system and how to modify my bash_profile to let it know I DO have a v2.7 or above installed. Thanks.
kingkamekameha
 
Posts: 2
Joined: Tue Jan 07, 2014 4:00 pm

Re: about installing matplotlib package

Postby micseydel » Wed Jan 08, 2014 9:12 pm

Your bash PATH is only local to a Terminal session, it doesn't affect the operating system at large. On Windows you right click your computer to do this on a larger scale, though I'm not sure how it is done on OS X. I'm sure you could Google that, but do know that Bash is inside of OS X and that OS X isn't affected by local changes to a Bash session.
Join the #python-forum IRC channel on irc.freenode.net!
User avatar
micseydel
 
Posts: 1115
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 2 guests