|
From: Samuel M. S. <sm...@sa...> - 2006-02-25 00:02:34
|
I found wx-config in
/usr/local/lib/wxPython-ansi-2.6.2.1/bin
./wx-config --version
2.6.2
there is another wx-config in /usr/bin that returns 2.5.3 for the
version
in setupext.py is the following function
def find_wx_config():
"""If the WX_CONFIG environment variable has been set, returns
it value.
Otherwise, search for `wx-config' in the PATH directories and
return the
first match found. Failing that, return None.
"""
wxconfig = os.getenv('WX_CONFIG')
if wxconfig is not None:
return wxconfig
path = os.getenv('PATH') or ''
for dir in path.split(':'):
wxconfig = os.path.join(dir, 'wx-config')
if os.path.exists(wxconfig):
return wxconfig
return None
I checked and I didn't have WX_CONFIG environment variable set to
anything.
so I set the environment variable
export WX_CONFIG="usr/local/lib/wxPython-ansi-2.6.2.1/bin/wx-config"
AlBook:smithsm$ echo $WX_CONFIG
usr/local/lib/wxPython-ansi-2.6.2.1/bin/wx-config
I removed the build directory rm -r build then I
python setup.py clean
python setup.py build
sudo python setup.py clean
but the problem does not go away!
from the debug output below it states that
the WXAgg backend is version 2.6.2.1
So I don't know what to do?
pythonw simple_plot.py --verbose-helpful
matplotlib data path /Library/Frameworks/Python.framework/Versions/
2.4/lib/python2.4/site-packages/matplotlib/mpl-data
$HOME=/Users/smithsm
CONFIGDIR=/Users/smithsm/.matplotlib
loaded rc file /Users/smithsm/.matplotlib/matplotlibrc
matplotlib version 0.87.1cvs
verbose.level helpful
interactive is False
platform is darwin
numerix numpy 0.9.5.2006
font search path ['/Library/Frameworks/Python.framework/Versions/2.4/
lib/python2.4/site-packages/matplotlib/mpl-data']
loaded ttfcache file /Users/smithsm/.matplotlib/ttffont.cache
backend WXAgg version 2.6.2.1
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/matplotlib/backends/backend_wx.py", line
1048, in _onPaint
self.draw(repaint=False)
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/matplotlib/backends/backend_wxagg.py", line
62, in draw
self.bitmap = _convert_agg_to_wx_bitmap(self.get_renderer(), None)
MemoryError: _wxagg.convert_agg_to_wx_bitmap(): could not create the
wx.Bitmap
Traceback (most recent call last):
File "simple_plot.py", line 16, in ?
show()
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/matplotlib/backends/backend_wx.py", line
1193, in show
figwin.canvas.draw()
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/site-packages/matplotlib/backends/backend_wxagg.py", line
62, in draw
self.bitmap = _convert_agg_to_wx_bitmap(self.get_renderer(), None)
MemoryError: _wxagg.convert_agg_to_wx_bitmap(): could not create the
wx.Bitmap
AlBook:smithsm$
On 24 Feb, 2006, at 15:33, Christopher Barker wrote:
> Samuel M. Smith wrote:
>> MemoryError: _wxagg.convert_agg_to_wx_bitmap(): could not create
>> the wx.Bitmap
>
> yes, if you are running OS-X 10.4. OS-X 10.4 comes with a version
> of wxPython pre-installed. It's an older version that you probably
> don't want to use, plus it's installed for python 2.3.5
>
> However, when you need to build wx code (which the wxagg back-end
> does), you can use the wx-config utility to find out what libs to
> link etc. Apple has installed a wx-config into /usr/bin/wx-config
> that points to their install of wx. You need to make sure MPL uses
> the wx-config that came with the version of wxPython you installed
> instead.
>
> I think it's in /usr/local/lib/wxPython-Something-or-other/bin/
> wxconfig
>
> There is an environment variable you can set to tell MPL's setup.py
> where to look for it. It escapes me for the moment what it's
> called, but poke around setup.py and friends and you'll find it.
>
> When you've got this all working, it would be great if you could
> contribute a binary mpkg to pythonmac.org.
>
> How did you link libpng and libfreetype? Statically I hope, so that
> a binary would be useful to everyone.
>
> -Chris
>
>
>
> --
> Christopher Barker, Ph.D.
> Oceanographer
>
> NOAA/OR&R/HAZMAT (206) 526-6959 voice
> 7600 Sand Point Way NE (206) 526-6329 fax
> Seattle, WA 98115 (206) 526-6317 main reception
>
> Chr...@no...
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting
> language
> that extends applications into web and mobile media. Attend the
> live webcast
> and join the prime developer group breaking into this new coding
> territory!
> http://sel.as-us.falkag.net/sel?
> cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
**********************************************************************
Samuel M. Smith Ph.D.
2966 Fort Hill Road
Eagle Mountain, Utah 84043
801-768-2768 voice
801-768-2769 fax
**********************************************************************
"The greatest source of failure and unhappiness in the world is
giving up what we want most for what we want at the moment"
**********************************************************************
|