Re: [Pythonmac-SIG] pythonmac packages question

2006-12-07 Thread Russell E. Owen
In article <[EMAIL PROTECTED]>,
 belinda thom <[EMAIL PROTECTED]> wrote:

> 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?

Tkinter is already included with MacPython. It will use the built-in 
(crummy) Aqua Tcl/Tk or you can install a newer better version.

ActiveState recently released 8.4.14 as a universal binary (the first 
universal binary version), which is handy if you want to redistribute 
your code. So far it seems pretty robust, though it does have a few 
known bugs.

-- Russell

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] pythonmac packages question

2006-12-07 Thread Ronald Oussoren

On Dec 7, 2006, at 1:50 PM, Kevin Walzer wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
>> tkinter is part of the standard installation for macpython.
>>
>
>
> What does this mean? Does MacPython 2.5 now install a universal  
> build of
> the Tcl/Tk frameworks in /Library/Frameworks?

No it means that MacPython ships with _tkinter.so. If you're running  
on a 10.3 system you still have to install Tcl/Tk by hand.

Either way you're hosed because the Aqua version of Tk sucks.

Ronald

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] pythonmac packages question

2006-12-07 Thread Kevin Walzer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


> tkinter is part of the standard installation for macpython.
> 


What does this mean? Does MacPython 2.5 now install a universal build of
the Tcl/Tk frameworks in /Library/Frameworks?

- --
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFeA4TEsLm8HXyq4sRAr6AAJsErqcP7BcUEYlH3LpzBtnj/rXktACgh2dp
m17UbFdUdXOk7vfeR5PHh0w=
=SRIb
-END PGP SIGNATURE-
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] pythonmac packages question

2006-12-07 Thread belinda thom
Thanks folksthe saga continues...

> No you don't want that. Add /Library/Frameworks/Python.framework/ 
> Versions/Current/bin to your shell's PATH, which the macpython  
> installer should do automaticly.
>
> The major advantages of that are that all python stuff is nicely  
> self-contained in the python framework and it is possible to do  
> side-by-side installations of multiple versions of python (such as  
> Python 2.4 and 2.5).
>
> Ronald

I've gotten easy-install running, which allowed me to download a  
brand-spanking new version of ipython (0.7.2). Recall I've also  
installed (via http://pythonmac.org/packages/py24-fat/index.html)  
matplotlib, Numeric, and wxPython (the latest version: 2.7.1.3; there  
was also a 2.6.3.3 version).

I run my new ipython with the -pylab option (using WXAgg backend and  
interactive True) and still get the following warning:
-
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- 
packages/ipython-0.7.2-py2.4.egg/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
--

followed by the same ability to not be able to use matplotlib  
commands, e.g.

 from pylab import *
 plot([1,2,3])

gives the same Memory / wx error:
---
In [3]:
exceptions.MemoryError   Traceback (most  
recent call last)
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- 
packages/matplotlib/backends/backend_wx.py in _onPaint(self, evt)
1046 self.realize()
1047 # Render to the bitmap
-> 1048 self.draw(repaint=False)
1049 # Update the display using a PaintDC
1050 self.gui_repaint(drawDC=wx.PaintDC(self))
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- 
packages/matplotlib/backends/backend_wxagg.py in draw(self, repaint)
  61 FigureCanvasAgg.draw(self)
  62
---> 63 self.bitmap = _convert_agg_to_wx_bitmap 
(self.get_renderer(), None)
  64 if repaint:
  65 self.gui_repaint()
MemoryError: _wxagg.convert_agg_to_wx_bitmap(): could not create the  
wx.Bitmap


I also tried using the TkAgg backend, which produces very different  
complaints, e.g:

In [16]: rcParamsDefault['backend']
Out[16]: 'TkAgg'

In [18]: plot([1,2,3])

exceptions.TypeError Traceback (most  
recent call last)

/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site- 
packages/matplotlib/axes.py in set_xlim(self, xmin, xmax, emit)
1225 xmax += 1e-38
1226
-> 1227 self.viewLim.intervalx().set_bounds(xmin, xmax)
1228 if emit: self._send_xlim_event()
1229 return xmin, xmax

TypeError: only length-1 arrays can be converted to Python scalars.
-

Have any of you been able to use matplotlib w/ipython in the MacPorts  
setting? What am I doing incorrectly?

Thanks again,

--b

  
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] pythonmac packages question

2006-12-07 Thread Ronald Oussoren

On Dec 7, 2006, at 9:48 AM, Nicholas Riley wrote:

> On Thu, Dec 07, 2006 at 12:38:36AM -0800, belinda thom wrote:
>> On Dec 7, 2006, at 12:36 AM, belinda thom wrote:
>>
>>> Thanks Nicholas,
>>>
>>> So how do I use easy install :-)?
>
> 
>
> Of particular importance is the section on "custom installation
> locations":
>
>  installation-locations>
>
> Before starting you probably want to edit the ~/.pydistutils.cfg file
> to specify a different location for installing scripts (for example,
> /usr/local/bin).

No you don't want that. Add /Library/Frameworks/Python.framework/ 
Versions/Current/bin to your shell's PATH, which the macpython  
installer should do automaticly.

The major advantages of that are that all python stuff is nicely self- 
contained in the python framework and it is possible to do side-by- 
side installations of multiple versions of python (such as Python 2.4  
and 2.5).

Ronald

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] pythonmac packages question

2006-12-07 Thread Nicholas Riley
On Thu, Dec 07, 2006 at 12:38:36AM -0800, belinda thom wrote:
> On Dec 7, 2006, at 12:36 AM, belinda thom wrote:
> 
> >Thanks Nicholas,
> >
> >So how do I use easy install :-)?



Of particular importance is the section on "custom installation
locations":



Before starting you probably want to edit the ~/.pydistutils.cfg file
to specify a different location for installing scripts (for example,
/usr/local/bin).  If you just want to install the packages for
yourself, then check out the Mac OS X "User" installation section.

Then download and run ez_setup.py, which bootstraps setuptools, and
run "easy_install IPython".  This will work with many simple packages,
and some complex ones too.

-- 
Nicholas Riley <[EMAIL PROTECTED]> | 
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] pythonmac packages question

2006-12-07 Thread Ronald Oussoren

On Dec 7, 2006, at 9:29 AM, belinda thom wrote:

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

tkinter is part of the standard installation for macpython.

Ronald
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] pythonmac packages question

2006-12-07 Thread belinda thom
Whoops, forgot to reply to the forum...

On Dec 7, 2006, at 12:36 AM, belinda thom wrote:

> Thanks Nicholas,
>
> So how do I use easy install :-)?
>
> On Dec 7, 2006, at 12:35 AM, Nicholas Riley wrote:
>
>> For IPython, just use easy_install.  You may need to add Python's bin
>> directory to your path, depending on how you configure it.
>

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] pythonmac packages question

2006-12-07 Thread Nicholas Riley
On Thu, Dec 07, 2006 at 12:29:58AM -0800, belinda thom wrote:
> This site has no Tkinter and no IPython packages. Where do MacPython  
> people go for such things?

Tkinter comes with MacPython; you don't need to install it separately.

For IPython, just use easy_install.  You may need to add Python's bin
directory to your path, depending on how you configure it.

-- 
Nicholas Riley <[EMAIL PROTECTED]> | 
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] pythonmac packages question

2006-12-07 Thread belinda thom
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


___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig