[Pythonmac-SIG] pythonmac packages question

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


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 and  

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


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
 >>> import pylab
 >>> pylab.plot([1,2,3],[10,20,30])
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/ 
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
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.
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])
exceptions.MemoryError                               Traceback (most  
recent call last)
packages/matplotlib/backends/backend_wx.py in _onPaint(self, evt)
MemoryError: _wxagg.convert_agg_to_wx_bitmap(): could not create the  
 > /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ 
---> 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.


More information about the Pythonmac-SIG mailing list