[Pythonmac-SIG] pythonmac packages question

belinda thom bthom at cs.hmc.edu
Thu Dec 7 09:29:58 CET 2006


Hi,

As of my prior post, I was able to get into pythonmac.org.

There I found many of the packages it seems I'll need. I was able to  
install Numeric and WxPython (I chose the later dmg, v 2.7.1.3) and  
matplotlib.

This site has no Tkinter and no IPython packages. Where do MacPython  
people go for such things?

Meanwhile...

If I run python alone and try out pylab, I get the following errors:
----------------
85 % python
Python 2.4.4 (#1, Oct 18 2006, 10:34:39)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
[snip]
 >>> import pylab
 >>> pylab.plot([1,2,3],[10,20,30])
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- 
packages/matplotlib/axes.py:1223: UserWarning: xmax too close to  
xmin; adjusting
   warnings.warn("xmax too close to xmin; adjusting")
Traceback (most recent call last):  File "/Library/Frameworks/ 
Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/ 
axes.py", line 1227, in set_xlim
     self.viewLim.intervalx().set_bounds(xmin, xmax)
TypeError: only length-1 arrays can be converted to Python scalars.
------------------

I've read elsewhere IPython is the rec'd way to use pylab b/c it sets  
up some needed things like an extra thread. As a temporary hack, I  
added a symlink to /Library/Frameworks/Python.framework/Versions/2.4/ 
lib/python2.4/site-packages that points to the macports IPython  
install I'd done previously. This seems to work (ipython runs).

However, when I do:
-------------------
4 % ipython -pylab
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- 
packages/IPython/Shell.py:709: DeprecationWarning: The wxPython  
compatibility package is no longer automatically generated or activly  
maintained.  Please switch to the wx package as soon as possible.
   import wxPython.wx as wx
Python 2.4.4 (#1, Oct 18 2006, 10:34:39)
Type "copyright", "credits" or "license" for more information.
[snikp]
IPython 0.7.2 -- An enhanced Interactive Python.
   Welcome to pylab, a matplotlib-based Python environment.
   For more information, type 'help(pylab)'.

In [1]: from pylab import *
In [2]: plot([1,2,3])
[snip]
exceptions.MemoryError                               Traceback (most  
recent call last)
[snip]
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- 
packages/matplotlib/backends/backend_wx.py in _onPaint(self, evt)
MemoryError: _wxagg.convert_agg_to_wx_bitmap(): could not create the  
wx.Bitmap
 > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ 
site-packages/matplotlib/backends/backend_wxagg.py(63)draw()
      62
---> 63         self.bitmap = _convert_agg_to_wx_bitmap 
(self.get_renderer(), None)
      64         if repaint:
----------

The initial warning implies the MacPython stuff isn't happy with  
macport's IPython's.

I'm confused as to how to proceed. Advice greatly appreciated.

--b




More information about the Pythonmac-SIG mailing list