|
From: Lisa M W. <Lis...@Co...> - 2009-12-02 20:31:31
|
Hello. I am finding it very difficult to install matplotlib with snow leopard. I have the Apple XCODE installed along with numpy (which I have tested and works) and am running the python 2.6 version that comes with the Mac. I have run into the following problems: 1) The diskimage installation: When I open the installer, I am told that I can not install matplotlib on my disk because I do not have a system version of python 2.6. I do not understand this error since I am running the default version (which is 2.6.1). 2) As another person on the list pointed out, easy_install matplotlib tries to install an older version that does not work with the newer version of numpy. 3) I downloaded the matplotlib-0.99.1.1-py2.6 egg. I was able to install matplotlib, seemingly. When I import pylab into python, I do not get any errors. However, I do get an error when I try to plot. With the default backend TkAgg (version 8.5), I get the following error when I try to plot: _tkinter.TclError: integer value too large to represent When I try to change the backend to MacOSX, a window opens labeled Figure 1, but nothing plots. With the verbose level on helpful, I find only that "backend MacOSX version unknown". Has anyone seen any of these problems before and have an idea as to how to fix this? If not, is there another method that I should try (I'm hesitant to try to build/install from the source). Thank you for any help! |
|
From: Michael C. <mc...@ca...> - 2009-12-02 20:58:53
|
Hi all, I made a typical plot, and tried to save it to EPS. The resulting file is un-openable in gimp, the gnome thumbnail viewer, evince, and anything else I have tried. Is there any problem saving a plot to EPS at the moment? Cheers Mike |
|
From: Michael C. <mc...@ca...> - 2009-12-02 21:20:40
|
Hi, To add more information. I am trying this on two separate installs of matplotlib 0.99, both using TkAgg as the backend. One produces an unreadable file, the other does produce a readable EPS. However, even in this case, zooming in on the image shows that what is being saved is bitmapped, not a vector graphic. Cheers Mike Michael Cohen wrote: > Hi all, > I made a typical plot, and tried to save it to EPS. The resulting file > is un-openable in gimp, the gnome thumbnail viewer, evince, and anything > else I have tried. > Is there any problem saving a plot to EPS at the moment? |
|
From: John H. <jd...@gm...> - 2009-12-02 21:26:09
|
On Wed, Dec 2, 2009 at 3:20 PM, Michael Cohen <mc...@ca...> wrote: > Hi, > To add more information. I am trying this on two separate installs of > matplotlib 0.99, both using TkAgg as the backend. One produces an > unreadable file, the other does produce a readable EPS. However, even > in this case, zooming in on the image shows that what is being saved is > bitmapped, not a vector graphic. Could you please post some sample code and the EPS it generates, as well as platform information and any specific rc settings you may have? Thanks, JDH |
|
From: Michael C. <mc...@ca...> - 2009-12-07 00:09:25
|
Hi, Sorry for taking a few days to reply. Basic system information $ uname -a Linux shc-b 2.6.18-128.1.10.el5 #1 SMP Wed Apr 29 13:53:08 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux $ head -n1 /etc/issue Red Hat Enterprise Linux Server release 5.3 (Tikanga) $ matplotlibrc attached. plot_test.py attached also. $ python Python 2.6.2 (r262:71600, Sep 16 2009, 13:37:23) [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import matplotlib >>> print matplotlib.__version__ 0.99.0 >>> finally, failed output eps also attached. The plot generates a set of horizontal and vertical lines to make a grid, and then applies the Mollweide projection to give latitude and longitude lines. For some reason, not running the projection (i.e. lines 43-51 in the python script) gives a file that outputs as a nice eps. If you do keep the Mollweide projection in, you still generate a lovely plot, but the savefig to .eps fails. Thanks, Michael John Hunter wrote: > On Wed, Dec 2, 2009 at 3:20 PM, Michael Cohen <mc...@ca...> wrote: >> Hi, >> To add more information. I am trying this on two separate installs of >> matplotlib 0.99, both using TkAgg as the backend. One produces an >> unreadable file, the other does produce a readable EPS. However, even >> in this case, zooming in on the image shows that what is being saved is >> bitmapped, not a vector graphic. > > Could you please post some sample code and the EPS it generates, as > well as platform information and any specific rc settings you may > have? > > Thanks, > JDH |
|
From: Michael C. <mc...@ca...> - 2009-12-09 20:51:29
|
Hi there, Does anyone know what might be the problem with this EPS write? Please see my email of Dec 6th for the attachments. Regards, Michael Michael Cohen wrote: > Hi, > > Sorry for taking a few days to reply. > Basic system information > > $ uname -a > Linux shc-b 2.6.18-128.1.10.el5 #1 SMP Wed Apr 29 13:53:08 EDT 2009 > x86_64 x86_64 x86_64 GNU/Linux > $ head -n1 /etc/issue > Red Hat Enterprise Linux Server release 5.3 (Tikanga) > $ > > matplotlibrc attached. > > plot_test.py attached also. > > $ python > Python 2.6.2 (r262:71600, Sep 16 2009, 13:37:23) > [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import matplotlib > >>> print matplotlib.__version__ > 0.99.0 > >>> > > finally, failed output eps also attached. > > The plot generates a set of horizontal and vertical lines to make a > grid, and then applies the Mollweide projection to give latitude and > longitude lines. > For some reason, not running the projection (i.e. lines 43-51 in the > python script) gives a file that outputs as a nice eps. If you do keep > the Mollweide projection in, you still generate a lovely plot, but the > savefig to .eps fails. > > Thanks, > Michael > > > John Hunter wrote: >> On Wed, Dec 2, 2009 at 3:20 PM, Michael Cohen <mc...@ca...> wrote: >>> Hi, >>> To add more information. I am trying this on two separate installs of >>> matplotlib 0.99, both using TkAgg as the backend. One produces an >>> unreadable file, the other does produce a readable EPS. However, even >>> in this case, zooming in on the image shows that what is being saved is >>> bitmapped, not a vector graphic. >> >> Could you please post some sample code and the EPS it generates, as >> well as platform information and any specific rc settings you may >> have? >> >> Thanks, >> JDH |
|
From: Michael D. <md...@st...> - 2009-12-09 21:21:20
|
I can confirm this bug on matplotlib-0.99.0, and 0.99.1.2, but not on SVN head. I think this is related to a recently fixed bug involving the renderer outputting single-point lines (which obviously doesn't make sense, and Postscript has problems with). You can either install from SVN (I recommend using the 0.99.x branch [1], rather than the trunk), or set the rcParam 'path.simplify' to False. Unfortunately, the latter will result in some very large file sizes. [1] https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_99_maint Cheers, Mike Michael Cohen wrote: > Hi there, > Does anyone know what might be the problem with this EPS write? > Please see my email of Dec 6th for the attachments. > > Regards, > Michael > > Michael Cohen wrote: > >> Hi, >> >> Sorry for taking a few days to reply. >> Basic system information >> >> $ uname -a >> Linux shc-b 2.6.18-128.1.10.el5 #1 SMP Wed Apr 29 13:53:08 EDT 2009 >> x86_64 x86_64 x86_64 GNU/Linux >> $ head -n1 /etc/issue >> Red Hat Enterprise Linux Server release 5.3 (Tikanga) >> $ >> >> matplotlibrc attached. >> >> plot_test.py attached also. >> >> $ python >> Python 2.6.2 (r262:71600, Sep 16 2009, 13:37:23) >> [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. >> >>> import matplotlib >> >>> print matplotlib.__version__ >> 0.99.0 >> >>> >> >> finally, failed output eps also attached. >> >> The plot generates a set of horizontal and vertical lines to make a >> grid, and then applies the Mollweide projection to give latitude and >> longitude lines. >> For some reason, not running the projection (i.e. lines 43-51 in the >> python script) gives a file that outputs as a nice eps. If you do keep >> the Mollweide projection in, you still generate a lovely plot, but the >> savefig to .eps fails. >> >> Thanks, >> Michael >> >> >> John Hunter wrote: >> >>> On Wed, Dec 2, 2009 at 3:20 PM, Michael Cohen <mc...@ca...> wrote: >>> >>>> Hi, >>>> To add more information. I am trying this on two separate installs of >>>> matplotlib 0.99, both using TkAgg as the backend. One produces an >>>> unreadable file, the other does produce a readable EPS. However, even >>>> in this case, zooming in on the image shows that what is being saved is >>>> bitmapped, not a vector graphic. >>>> >>> Could you please post some sample code and the EPS it generates, as >>> well as platform information and any specific rc settings you may >>> have? >>> >>> Thanks, >>> JDH >>> > > ------------------------------------------------------------------------------ > Return on Information: > Google Enterprise Search pays you back > Get the facts. > http://p.sf.net/sfu/google-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Michael C. <mc...@ca...> - 2009-12-10 09:18:10
|
Thanks, the svn version is working nicely. Cheers Mike On 12/09/2009 01:21 PM, Michael Droettboom wrote: > I can confirm this bug on matplotlib-0.99.0, and 0.99.1.2, but not on > SVN head. I think this is related to a recently fixed bug involving the > renderer outputting single-point lines (which obviously doesn't make > sense, and Postscript has problems with). > > You can either install from SVN (I recommend using the 0.99.x branch > [1], rather than the trunk), or set the rcParam 'path.simplify' to > False. Unfortunately, the latter will result in some very large file sizes. > > [1] https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_99_maint > > Cheers, > Mike > > Michael Cohen wrote: >> Hi there, >> Does anyone know what might be the problem with this EPS write? >> Please see my email of Dec 6th for the attachments. >> >> Regards, >> Michael >> >> Michael Cohen wrote: >>> Hi, >>> >>> Sorry for taking a few days to reply. >>> Basic system information >>> >>> $ uname -a >>> Linux shc-b 2.6.18-128.1.10.el5 #1 SMP Wed Apr 29 13:53:08 EDT 2009 >>> x86_64 x86_64 x86_64 GNU/Linux >>> $ head -n1 /etc/issue >>> Red Hat Enterprise Linux Server release 5.3 (Tikanga) >>> $ >>> >>> matplotlibrc attached. >>> >>> plot_test.py attached also. >>> >>> $ python >>> Python 2.6.2 (r262:71600, Sep 16 2009, 13:37:23) >>> [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2 >>> Type "help", "copyright", "credits" or "license" for more information. >>> >>> import matplotlib >>> >>> print matplotlib.__version__ >>> 0.99.0 >>> >>> >>> >>> finally, failed output eps also attached. >>> >>> The plot generates a set of horizontal and vertical lines to make a >>> grid, and then applies the Mollweide projection to give latitude and >>> longitude lines. >>> For some reason, not running the projection (i.e. lines 43-51 in the >>> python script) gives a file that outputs as a nice eps. If you do >>> keep the Mollweide projection in, you still generate a lovely plot, >>> but the savefig to .eps fails. >>> >>> Thanks, >>> Michael >>> >>> >>> John Hunter wrote: >>>> On Wed, Dec 2, 2009 at 3:20 PM, Michael Cohen <mc...@ca...> >>>> wrote: >>>>> Hi, >>>>> To add more information. I am trying this on two separate installs of >>>>> matplotlib 0.99, both using TkAgg as the backend. One produces an >>>>> unreadable file, the other does produce a readable EPS. However, even >>>>> in this case, zooming in on the image shows that what is being >>>>> saved is >>>>> bitmapped, not a vector graphic. >>>> Could you please post some sample code and the EPS it generates, as >>>> well as platform information and any specific rc settings you may >>>> have? >>>> >>>> Thanks, >>>> JDH >> >> ------------------------------------------------------------------------------ >> >> Return on Information: >> Google Enterprise Search pays you back >> Get the facts. >> http://p.sf.net/sfu/google-dev2dev >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: William C. <wcc...@lb...> - 2009-12-02 21:18:02
Attachments:
make.osx
|
Hi Lisa, I had lots of trouble installing on 10.6 as well. What finally worked for me is to use the (recommended) file make.osx that comes with the matplotlib download. You have to edit that file to point to the versions of Python (you want 2.6) and OSX (you want 10.6). I'm attaching a version that has all these edits already made. (I'm assuming you have an intel Mac, not a ppc). Look at the top of the file and you will see an example command line that begins with PREFIX. You'll execute that command line with the example directory changed to your directory and I highly recommend choosing the directory /Users/(whatever your user name is)/.local All the libraries will be installed there and Python will know how to find them even without explicitly putting them in any PATH variable. This command line will even check for required dependencies like freetype2, pnglib, ... And will go them and install them for you if you don't already have them. The command line should look like: sudo PREFIX=/Users/(your username)/.local make -f make.osx fetch deps mpl_install Good luck, Bill On 12/2/09 12:31 PM, "Lisa M Winter" <Lis...@Co...> wrote: > Hello. > > I am finding it very difficult to install matplotlib with snow > leopard. I have the Apple XCODE installed along with numpy (which I > have tested and works) and am running the python 2.6 version that > comes with the Mac. > > I have run into the following problems: > 1) The diskimage installation: When I open the installer, I am told > that I can not install matplotlib on my disk because I do not have a > system version of python 2.6. I do not understand this error since I > am running the default version (which is 2.6.1). > > 2) As another person on the list pointed out, easy_install matplotlib > tries to install an older version that does not work with the newer > version of numpy. > > 3) I downloaded the matplotlib-0.99.1.1-py2.6 egg. I was able to > install matplotlib, seemingly. When I import pylab into python, I do > not get any errors. However, I do get an error when I try to plot. > With the default backend TkAgg (version 8.5), I get the following > error when I try to plot: > _tkinter.TclError: integer value too large to represent > > When I try to change the backend to MacOSX, a window opens labeled > Figure 1, but nothing plots. With the verbose level on helpful, I > find only that "backend MacOSX version unknown". > > Has anyone seen any of these problems before and have an idea as to > how to fix this? If not, is there another method that I should try > (I'm hesitant to try to build/install from the source). > > Thank you for any help! > > ------------------------------------------------------------------------------ > Join us December 9, 2009 for the Red Hat Virtual Experience, > a free event focused on virtualization and cloud computing. > Attend in-depth sessions from your desk. Your couch. Anywhere. > http://p.sf.net/sfu/redhat-sfdev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Lisa M W. <Lis...@Co...> - 2009-12-02 22:01:28
|
Thanks for the pointers, Bill.
I tried installing from source as you suggested, but I am getting the
same errors when I try to plot. What backend are you using?
Here is what I get when I try using TkAgg:
casa98-125-dhcp:.matplotlib lisa$ python simple_plot.py --verbose-
helpful
$HOME=/Users/lisa
matplotlib data path /Users/lisa/.local/lib/python2.6/site-packages/
matplotlib/mpl-data
loaded rc file /Users/lisa/.matplotlib/matplotlibrc
matplotlib version 0.99.1.1
verbose.level helpful
interactive is True
units is False
platform is darwin
CONFIGDIR=/Users/lisa/.matplotlib
Using fontManager instance from /Users/lisa/.matplotlib/fontList.cache
backend TkAgg version 8.5
Traceback (most recent call last):
File "simple_plot.py", line 2, in <module>
plot([1,2,3])
File "/Users/lisa/.local/lib/python2.6/site-packages/matplotlib/
pyplot.py", line 2134, in plot
ax = gca()
File "/Users/lisa/.local/lib/python2.6/site-packages/matplotlib/
pyplot.py", line 582, in gca
ax = gcf().gca(**kwargs)
File "/Users/lisa/.local/lib/python2.6/site-packages/matplotlib/
pyplot.py", line 276, in gcf
return figure()
File "/Users/lisa/.local/lib/python2.6/site-packages/matplotlib/
pyplot.py", line 254, in figure
**kwargs)
File "/Users/lisa/.local/lib/python2.6/site-packages/matplotlib/
backends/backend_tkagg.py", line 91, in new_figure_manager
canvas = FigureCanvasTkAgg(figure, master=window)
File "/Users/lisa/.local/lib/python2.6/site-packages/matplotlib/
backends/backend_tkagg.py", line 158, in __init__
master=self._tkcanvas, width=w, height=h)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/lib-tk/Tkinter.py", line 3284, in __init__
Image.__init__(self, 'photo', name, cnf, master, **kw)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/lib-tk/Tkinter.py", line 3240, in __init__
self.tk.call(('image', 'create', imgtype, name,) + options)
_tkinter.TclError: integer value too large to represent
Lisa
On Dec 2, 2009, at 2:17 PM, William Carithers wrote:
> Hi Lisa,
>
> I had lots of trouble installing on 10.6 as well. What finally
> worked for me
> is to use the (recommended) file make.osx that comes with the
> matplotlib
> download. You have to edit that file to point to the versions of
> Python (you
> want 2.6) and OSX (you want 10.6). I'm attaching a version that has
> all
> these edits already made. (I'm assuming you have an intel Mac, not a
> ppc).
>
> Look at the top of the file and you will see an example command line
> that
> begins with PREFIX. You'll execute that command line with the example
> directory changed to your directory and I highly recommend choosing
> the
> directory /Users/(whatever your user name is)/.local All the
> libraries will
> be installed there and Python will know how to find them even without
> explicitly putting them in any PATH variable. This command line will
> even
> check for required dependencies like freetype2, pnglib, ... And will
> go them
> and install them for you if you don't already have them. The command
> line
> should look like:
> sudo PREFIX=/Users/(your username)/.local make -f make.osx fetch deps
> mpl_install
>
> Good luck,
> Bill
> On 12/2/09 12:31 PM, "Lisa M Winter" <Lis...@Co...> wrote:
>
>> Hello.
>>
>> I am finding it very difficult to install matplotlib with snow
>> leopard. I have the Apple XCODE installed along with numpy (which I
>> have tested and works) and am running the python 2.6 version that
>> comes with the Mac.
>>
>> I have run into the following problems:
>> 1) The diskimage installation: When I open the installer, I am told
>> that I can not install matplotlib on my disk because I do not have a
>> system version of python 2.6. I do not understand this error since I
>> am running the default version (which is 2.6.1).
>>
>> 2) As another person on the list pointed out, easy_install matplotlib
>> tries to install an older version that does not work with the newer
>> version of numpy.
>>
>> 3) I downloaded the matplotlib-0.99.1.1-py2.6 egg. I was able to
>> install matplotlib, seemingly. When I import pylab into python, I do
>> not get any errors. However, I do get an error when I try to plot.
>> With the default backend TkAgg (version 8.5), I get the following
>> error when I try to plot:
>> _tkinter.TclError: integer value too large to represent
>>
>> When I try to change the backend to MacOSX, a window opens labeled
>> Figure 1, but nothing plots. With the verbose level on helpful, I
>> find only that "backend MacOSX version unknown".
>>
>> Has anyone seen any of these problems before and have an idea as to
>> how to fix this? If not, is there another method that I should try
>> (I'm hesitant to try to build/install from the source).
>>
>> Thank you for any help!
>>
>> ------------------------------------------------------------------------------
>> Join us December 9, 2009 for the Red Hat Virtual Experience,
>> a free event focused on virtualization and cloud computing.
>> Attend in-depth sessions from your desk. Your couch. Anywhere.
>> http://p.sf.net/sfu/redhat-sfdev2dev
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> <
> make.osx
> >
> ------------------------------------------------------------------------------
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing.
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev_______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: William C. <wcc...@lb...> - 2009-12-02 22:43:04
|
Hi Lisa,
Hmm. I also use TKAgg with no problems. Looking at your code, it looks like
you are trying the first example in the tutorial. Just to be sure, could you
post/send a full listing of your simple_plot.py?
Thanks,
Bill
On 12/2/09 2:01 PM, "Lisa M Winter" <Lis...@Co...> wrote:
> Thanks for the pointers, Bill.
>
> I tried installing from source as you suggested, but I am getting the
> same errors when I try to plot. What backend are you using?
>
> Here is what I get when I try using TkAgg:
>
> casa98-125-dhcp:.matplotlib lisa$ python simple_plot.py --verbose-
> helpful
> $HOME=/Users/lisa
> matplotlib data path /Users/lisa/.local/lib/python2.6/site-packages/
> matplotlib/mpl-data
> loaded rc file /Users/lisa/.matplotlib/matplotlibrc
> matplotlib version 0.99.1.1
> verbose.level helpful
> interactive is True
> units is False
> platform is darwin
> CONFIGDIR=/Users/lisa/.matplotlib
> Using fontManager instance from /Users/lisa/.matplotlib/fontList.cache
> backend TkAgg version 8.5
> Traceback (most recent call last):
> File "simple_plot.py", line 2, in <module>
> plot([1,2,3])
> File "/Users/lisa/.local/lib/python2.6/site-packages/matplotlib/
> pyplot.py", line 2134, in plot
> ax = gca()
> File "/Users/lisa/.local/lib/python2.6/site-packages/matplotlib/
> pyplot.py", line 582, in gca
> ax = gcf().gca(**kwargs)
> File "/Users/lisa/.local/lib/python2.6/site-packages/matplotlib/
> pyplot.py", line 276, in gcf
> return figure()
> File "/Users/lisa/.local/lib/python2.6/site-packages/matplotlib/
> pyplot.py", line 254, in figure
> **kwargs)
> File "/Users/lisa/.local/lib/python2.6/site-packages/matplotlib/
> backends/backend_tkagg.py", line 91, in new_figure_manager
> canvas = FigureCanvasTkAgg(figure, master=window)
> File "/Users/lisa/.local/lib/python2.6/site-packages/matplotlib/
> backends/backend_tkagg.py", line 158, in __init__
> master=self._tkcanvas, width=w, height=h)
> File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/
> python2.6/lib-tk/Tkinter.py", line 3284, in __init__
> Image.__init__(self, 'photo', name, cnf, master, **kw)
> File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/
> python2.6/lib-tk/Tkinter.py", line 3240, in __init__
> self.tk.call(('image', 'create', imgtype, name,) + options)
> _tkinter.TclError: integer value too large to represent
>
>
> Lisa
>
>
> On Dec 2, 2009, at 2:17 PM, William Carithers wrote:
>
>> Hi Lisa,
>>
>> I had lots of trouble installing on 10.6 as well. What finally
>> worked for me
>> is to use the (recommended) file make.osx that comes with the
>> matplotlib
>> download. You have to edit that file to point to the versions of
>> Python (you
>> want 2.6) and OSX (you want 10.6). I'm attaching a version that has
>> all
>> these edits already made. (I'm assuming you have an intel Mac, not a
>> ppc).
>>
>> Look at the top of the file and you will see an example command line
>> that
>> begins with PREFIX. You'll execute that command line with the example
>> directory changed to your directory and I highly recommend choosing
>> the
>> directory /Users/(whatever your user name is)/.local All the
>> libraries will
>> be installed there and Python will know how to find them even without
>> explicitly putting them in any PATH variable. This command line will
>> even
>> check for required dependencies like freetype2, pnglib, ... And will
>> go them
>> and install them for you if you don't already have them. The command
>> line
>> should look like:
>> sudo PREFIX=/Users/(your username)/.local make -f make.osx fetch deps
>> mpl_install
>>
>> Good luck,
>> Bill
>> On 12/2/09 12:31 PM, "Lisa M Winter" <Lis...@Co...> wrote:
>>
>>> Hello.
>>>
>>> I am finding it very difficult to install matplotlib with snow
>>> leopard. I have the Apple XCODE installed along with numpy (which I
>>> have tested and works) and am running the python 2.6 version that
>>> comes with the Mac.
>>>
>>> I have run into the following problems:
>>> 1) The diskimage installation: When I open the installer, I am told
>>> that I can not install matplotlib on my disk because I do not have a
>>> system version of python 2.6. I do not understand this error since I
>>> am running the default version (which is 2.6.1).
>>>
>>> 2) As another person on the list pointed out, easy_install matplotlib
>>> tries to install an older version that does not work with the newer
>>> version of numpy.
>>>
>>> 3) I downloaded the matplotlib-0.99.1.1-py2.6 egg. I was able to
>>> install matplotlib, seemingly. When I import pylab into python, I do
>>> not get any errors. However, I do get an error when I try to plot.
>>> With the default backend TkAgg (version 8.5), I get the following
>>> error when I try to plot:
>>> _tkinter.TclError: integer value too large to represent
>>>
>>> When I try to change the backend to MacOSX, a window opens labeled
>>> Figure 1, but nothing plots. With the verbose level on helpful, I
>>> find only that "backend MacOSX version unknown".
>>>
>>> Has anyone seen any of these problems before and have an idea as to
>>> how to fix this? If not, is there another method that I should try
>>> (I'm hesitant to try to build/install from the source).
>>>
>>> Thank you for any help!
>>>
>>> ----------------------------------------------------------------------------
>>> --
>>> Join us December 9, 2009 for the Red Hat Virtual Experience,
>>> a free event focused on virtualization and cloud computing.
>>> Attend in-depth sessions from your desk. Your couch. Anywhere.
>>> http://p.sf.net/sfu/redhat-sfdev2dev
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>> <
>> make.osx
>>>
>>
----------------------------------------------------------------------------->>
-
>> Join us December 9, 2009 for the Red Hat Virtual Experience,
>> a free event focused on virtualization and cloud computing.
>> Attend in-depth sessions from your desk. Your couch. Anywhere.
>> http://p.sf.net/sfu/redhat-sfdev2dev_________________________________________
>> ______
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Lisa M W. <Lis...@Co...> - 2009-12-02 22:49:42
|
Sure. This is all that it is:
from pylab import *
plot([1,2,3])
show()
On Dec 2, 2009, at 3:42 PM, William Carithers wrote:
> Hi Lisa,
>
> Hmm. I also use TKAgg with no problems. Looking at your code, it
> looks like
> you are trying the first example in the tutorial. Just to be sure,
> could you
> post/send a full listing of your simple_plot.py?
>
> Thanks,
> Bill
>
> On 12/2/09 2:01 PM, "Lisa M Winter" <Lis...@Co...> wrote:
>
>> Thanks for the pointers, Bill.
>>
>> I tried installing from source as you suggested, but I am getting the
>> same errors when I try to plot. What backend are you using?
>>
>> Here is what I get when I try using TkAgg:
>>
>> casa98-125-dhcp:.matplotlib lisa$ python simple_plot.py --verbose-
>> helpful
>> $HOME=/Users/lisa
>> matplotlib data path /Users/lisa/.local/lib/python2.6/site-packages/
>> matplotlib/mpl-data
>> loaded rc file /Users/lisa/.matplotlib/matplotlibrc
>> matplotlib version 0.99.1.1
>> verbose.level helpful
>> interactive is True
>> units is False
>> platform is darwin
>> CONFIGDIR=/Users/lisa/.matplotlib
>> Using fontManager instance from /Users/lisa/.matplotlib/
>> fontList.cache
>> backend TkAgg version 8.5
>> Traceback (most recent call last):
>> File "simple_plot.py", line 2, in <module>
>> plot([1,2,3])
>> File "/Users/lisa/.local/lib/python2.6/site-packages/matplotlib/
>> pyplot.py", line 2134, in plot
>> ax = gca()
>> File "/Users/lisa/.local/lib/python2.6/site-packages/matplotlib/
>> pyplot.py", line 582, in gca
>> ax = gcf().gca(**kwargs)
>> File "/Users/lisa/.local/lib/python2.6/site-packages/matplotlib/
>> pyplot.py", line 276, in gcf
>> return figure()
>> File "/Users/lisa/.local/lib/python2.6/site-packages/matplotlib/
>> pyplot.py", line 254, in figure
>> **kwargs)
>> File "/Users/lisa/.local/lib/python2.6/site-packages/matplotlib/
>> backends/backend_tkagg.py", line 91, in new_figure_manager
>> canvas = FigureCanvasTkAgg(figure, master=window)
>> File "/Users/lisa/.local/lib/python2.6/site-packages/matplotlib/
>> backends/backend_tkagg.py", line 158, in __init__
>> master=self._tkcanvas, width=w, height=h)
>> File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/
>> python2.6/lib-tk/Tkinter.py", line 3284, in __init__
>> Image.__init__(self, 'photo', name, cnf, master, **kw)
>> File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/
>> python2.6/lib-tk/Tkinter.py", line 3240, in __init__
>> self.tk.call(('image', 'create', imgtype, name,) + options)
>> _tkinter.TclError: integer value too large to represent
>>
>>
>> Lisa
>>
>>
>> On Dec 2, 2009, at 2:17 PM, William Carithers wrote:
>>
>>> Hi Lisa,
>>>
>>> I had lots of trouble installing on 10.6 as well. What finally
>>> worked for me
>>> is to use the (recommended) file make.osx that comes with the
>>> matplotlib
>>> download. You have to edit that file to point to the versions of
>>> Python (you
>>> want 2.6) and OSX (you want 10.6). I'm attaching a version that has
>>> all
>>> these edits already made. (I'm assuming you have an intel Mac, not a
>>> ppc).
>>>
>>> Look at the top of the file and you will see an example command line
>>> that
>>> begins with PREFIX. You'll execute that command line with the
>>> example
>>> directory changed to your directory and I highly recommend choosing
>>> the
>>> directory /Users/(whatever your user name is)/.local All the
>>> libraries will
>>> be installed there and Python will know how to find them even
>>> without
>>> explicitly putting them in any PATH variable. This command line will
>>> even
>>> check for required dependencies like freetype2, pnglib, ... And will
>>> go them
>>> and install them for you if you don't already have them. The command
>>> line
>>> should look like:
>>> sudo PREFIX=/Users/(your username)/.local make -f make.osx fetch
>>> deps
>>> mpl_install
>>>
>>> Good luck,
>>> Bill
>>> On 12/2/09 12:31 PM, "Lisa M Winter" <Lis...@Co...>
>>> wrote:
>>>
>>>> Hello.
>>>>
>>>> I am finding it very difficult to install matplotlib with snow
>>>> leopard. I have the Apple XCODE installed along with numpy
>>>> (which I
>>>> have tested and works) and am running the python 2.6 version that
>>>> comes with the Mac.
>>>>
>>>> I have run into the following problems:
>>>> 1) The diskimage installation: When I open the installer, I am told
>>>> that I can not install matplotlib on my disk because I do not
>>>> have a
>>>> system version of python 2.6. I do not understand this error
>>>> since I
>>>> am running the default version (which is 2.6.1).
>>>>
>>>> 2) As another person on the list pointed out, easy_install
>>>> matplotlib
>>>> tries to install an older version that does not work with the newer
>>>> version of numpy.
>>>>
>>>> 3) I downloaded the matplotlib-0.99.1.1-py2.6 egg. I was able to
>>>> install matplotlib, seemingly. When I import pylab into python,
>>>> I do
>>>> not get any errors. However, I do get an error when I try to plot.
>>>> With the default backend TkAgg (version 8.5), I get the following
>>>> error when I try to plot:
>>>> _tkinter.TclError: integer value too large to represent
>>>>
>>>> When I try to change the backend to MacOSX, a window opens labeled
>>>> Figure 1, but nothing plots. With the verbose level on helpful, I
>>>> find only that "backend MacOSX version unknown".
>>>>
>>>> Has anyone seen any of these problems before and have an idea as to
>>>> how to fix this? If not, is there another method that I should try
>>>> (I'm hesitant to try to build/install from the source).
>>>>
>>>> Thank you for any help!
>>>>
>>>> ----------------------------------------------------------------------------
>>>> --
>>>> Join us December 9, 2009 for the Red Hat Virtual Experience,
>>>> a free event focused on virtualization and cloud computing.
>>>> Attend in-depth sessions from your desk. Your couch. Anywhere.
>>>> http://p.sf.net/sfu/redhat-sfdev2dev
>>>> _______________________________________________
>>>> Matplotlib-users mailing list
>>>> Mat...@li...
>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>> <
>>> make.osx
>>>>
>>>
> ----------------------------------------------------------------------------->
> >
> -
>>> Join us December 9, 2009 for the Red Hat Virtual Experience,
>>> a free event focused on virtualization and cloud computing.
>>> Attend in-depth sessions from your desk. Your couch. Anywhere.
>>> http://p.sf.net/sfu/redhat-sfdev2dev_________________________________________
>>> ______
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
>
> ------------------------------------------------------------------------------
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing.
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: William C. <wcc...@lb...> - 2009-12-02 22:58:18
|
You're right--that's pretty simple. I ran that exact code and it worked fine. Don't know what to say except that this is above my competence level to dig into the guts of tk. Looks like a problem for John Hunter. Sorry I couldn't help more, Bill On 12/2/09 2:49 PM, "Lisa M Winter" <Lis...@Co...> wrote: > from pylab import * > plot([1,2,3]) > show() |
|
From: Christopher B. <Chr...@no...> - 2009-12-02 23:21:10
|
Lisa M Winter wrote: > 1) The diskimage installation: When I open the installer, I am told > that I can not install matplotlib on my disk because I do not have a > system version of python 2.6. I do not understand this error since I > am running the default version (which is 2.6.1). The diskimage is usually built for the python binary supplied by python.org -- that is what the message means by the "system version". I tried to submit a patch to change that message a year or two ago, but I guess it never got applied -- maybe I'll try again. A note to developers/distributors: Robin Dunn figured out a way to install a binary wxPython that will work with both the Apple and the python.org binaries. What it does it put it in /usr/local, and then put a pth file in both of the pythons so that it can be found. A bit of a hack, but it works, and I've never heard anyone have a problem with it. Perhaps we should do the same thing with MPL -- I'm sure he'd be glad to share his scripts for building it. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
|
From: Christopher B. <Chr...@no...> - 2009-12-02 23:27:27
|
Christopher Barker wrote: > The diskimage is usually built for the python binary supplied by > python.org -- that is what the message means by the "system version". I > tried to submit a patch to change that message a year or two ago, but I > guess it never got applied -- maybe I'll try again. I took a look at the source for the latest bdist_mpkg -- it looks like it should now give a message like: "This package requires MacPython to be installed" though It's all a bit complicated -- did whoever built the dmg use the latest bdist_mpkg? But maybe should still do: > A note to developers/distributors: > > Robin Dunn figured out a way to install a binary wxPython that will work > with both the Apple and the python.org binaries. What it does it put it > in /usr/local, and then put a pth file in both of the pythons so that it > can be found. A bit of a hack, but it works, and I've never heard anyone > have a problem with it. > > Perhaps we should do the same thing with MPL -- I'm sure he'd be glad to > share his scripts for building it. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |