Re: [Matplotlib-users] Numpy v1.1.0 not compatible with pylab in matplotlib 0.9.1

2008-05-29 Thread Joshua Lippai
I've consistently been able to build matplotlib on OS X. Just make
sure you have all the dependencies installed. Personally, I have lbpng
and whatnot installed in /usr/local instead of /usr/X11. I don't know
if that'll help. Also, I use the GCC 4.2 that Apple has available for
download on developer.apple.com. Then you just change the Makefile in
the /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/
directory to not use Wno-long-double or no-cpp-precomp. I also took
out all the ppc arch flags since it was causing some issues there with
my versions of libpng and whatnot technically not being universal
binaries. If you don't want to build univeral binary versions of your
dependencies or use the ones alread provided in /usr/X11 (which are
universal I think), you should make Python only build for your
architecture, which is what I did.

My only issue with matplotlib thusfar seems to be the inability to do
the plot3d examples from the scipy website, but I'm told that stuff is
officially unsupported anyway.

Josh

On Wed, May 28, 2008 at 3:35 PM, Eric Firing [EMAIL PROTECTED] wrote:
 Christopher Barker wrote:
 Tommy Grav wrote:
 I
 don't know that it has ever all been consolidated into one easy-to-
 find, easy-to-use set of instructions that will work for just about anyone.

 no, it hasn't.
 And one of the reasons may be that it is very complicated in practice,
 with all the possible variations of OSX versions, Xcode versions,
 processor architectures, and styles of build for python itself and
 various libraries.  It seems to require learning a whole new jargon.

 However, I think:

 $ easy-install matplotlib

 should work, at least with the python.org python2.5

 Maybe someone can provide, or has provided, a universal binary of
 0.91.2  built against numpy 1.1?

 does it need to be built against numpy at all? I didn't think it was a
 build-time dependency -- that is, any MPL 0.91.2 should do, and you can
 drop a new numpy into it. I don't know if there is one yet, though...

 _backend_gdk.c and nxutils.c both call into the numpy C API; maybe some
 c++ code does also.  It is not entirely clear to me whether 1.1 is
 sufficiently binary-compatible that this is safe.


 There are essentially two options:

 1) built it just for yourself -- I think the instructions John H. posted
 are pretty easy to follow.

 That's the way they look, but having watched someone try it, I can
 testify that looks are deceptive.  I would say that with 95%
 probability, if Tommy tried to follow John's instructions, he would not
 succeed.

 Eric

 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Numpy v1.1.0 not compatible with pylab in matplotlib 0.9.1

2008-05-29 Thread Andrew Straw
Eric Firing wrote:
 _backend_gdk.c and nxutils.c both call into the numpy C API; maybe some
 c++ code does also.  It is not entirely clear to me whether 1.1 is 
 sufficiently binary-compatible that this is safe.
   

The C API did not change (with the possible exception of additions). I'd 
be really surprised if this is an issue -- the numpy devs worked to make 
sure there would be no breakage at the C API level.

(And even if it did change, as it might one day in the future -- numpy 
2? -- there's a check that happens at numpy load time, during 
import_array(), that checks whether the version of numpy you compiled 
with is the version you're loading now and raises an exception if it's 
not. So, the old nightmares of numeric and numarray possibly being run 
against binary incompatible versions are a thing of the past. This check 
actually saved quite a few headaches during the runup to numpy 1.0, when 
there were a number of C API changes happening in quick succession as 
Travis worked to get it right. That machinery is still in there.)

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Numpy v1.1.0 not compatible with pylab in matplotlib 0.9.1

2008-05-28 Thread Tommy Grav
[skathi:~/Work/myCode/pyS3M] tgrav% python
ActivePython 2.5.1.1 (ActiveState Software Inc.) based on
Python 2.5.1 (r251:54863, May  1 2007, 17:40:00)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
Type help, copyright, credits or license for more information.
  import numpy
  numpy.__version__
'1.1.0'
  import pylab
Traceback (most recent call last):
   File stdin, line 1, in module
   File /Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/pylab.py, line 1, in module
 from matplotlib.pylab import *
   File /Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/matplotlib/pylab.py, line 206, in module
 from matplotlib.numerix import npyma as ma
   File /Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/matplotlib/numerix/__init__.py, line 166, in  
module
 __import__('ma', g, l)
   File /Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/matplotlib/numerix/ma/__init__.py, line 16,  
in module
 from numpy.core.ma import *
ImportError: No module named ma
  import matplotlib
  matplotlib.__version__
'0.91.1'



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Numpy v1.1.0 not compatible with pylab in matplotlib 0.9.1

2008-05-28 Thread John Hunter
On Wed, May 28, 2008 at 12:37 PM, Tommy Grav [EMAIL PROTECTED] wrote:
 [skathi:~/Work/myCode/pyS3M] tgrav% python
 ActivePython 2.5.1.1 (ActiveState Software Inc.) based on
 Python 2.5.1 (r251:54863, May  1 2007, 17:40:00)
 [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
 Type help, copyright, credits or license for more information.
   import numpy
   numpy.__version__
 '1.1.0'   import matplotlib
   matplotlib.__version__
 '0.91.1'

The latest release of matplotlib (0.91.2) should work with the latest
release of numpy (1.1.0).  Please test that configuration.

Thanks,
JDH

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Numpy v1.1.0 not compatible with pylab in matplotlib 0.9.1

2008-05-28 Thread Eric Firing
Tommy,

That's right.  If you upgrade numpy you need to upgrade mpl to 0.91.2 or 
later.

Eric

Tommy Grav wrote:
 [skathi:~/Work/myCode/pyS3M] tgrav% python
 ActivePython 2.5.1.1 (ActiveState Software Inc.) based on
 Python 2.5.1 (r251:54863, May  1 2007, 17:40:00)
 [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
 Type help, copyright, credits or license for more information.
   import numpy
   numpy.__version__
 '1.1.0'
   import pylab
 Traceback (most recent call last):
File stdin, line 1, in module
File /Library/Frameworks/Python.framework/Versions/2.5/lib/ 
 python2.5/site-packages/pylab.py, line 1, in module
  from matplotlib.pylab import *
File /Library/Frameworks/Python.framework/Versions/2.5/lib/ 
 python2.5/site-packages/matplotlib/pylab.py, line 206, in module
  from matplotlib.numerix import npyma as ma
File /Library/Frameworks/Python.framework/Versions/2.5/lib/ 
 python2.5/site-packages/matplotlib/numerix/__init__.py, line 166, in  
 module
  __import__('ma', g, l)
File /Library/Frameworks/Python.framework/Versions/2.5/lib/ 
 python2.5/site-packages/matplotlib/numerix/ma/__init__.py, line 16,  
 in module
  from numpy.core.ma import *
 ImportError: No module named ma
   import matplotlib
   matplotlib.__version__
 '0.91.1'
 
 
 
 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2008.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Numpy v1.1.0 not compatible with pylab in matplotlib 0.9.1

2008-05-28 Thread Eric Firing
Tommy Grav wrote:
 On May 28, 2008, at 1:54 PM, Eric Firing wrote:
 
 Tommy,

 That's right.  If you upgrade numpy you need to upgrade mpl to  
 0.91.2 or later.

 Eric
 
 I am trying to build matplotlib from svn, but run into this error:

 ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libJPEG.dylib,  
 file is not of required architecture for architecture i386
 collect2: ld returned 1 exit status
 lipo: can't open input file: /var/folders/+9/+9BDgtoTFv4AaU0pWhEE4+++ 
 +TI/-Tmp-//ccUnfmnm.out (No such file or directory)
 error: command 'g++' failed with exit status 1
 [skathi:~/Downloads/matplotlib-0.91.2] tgrav%
 
 I am on a PPC running mac os x 10.5.2. How can I configure g++ to drop  
 the -arch i386 flag,
 or is there something else wrong here?

Building on the Mac seems to be a nightmare.  There are various emails 
and howto writeups (including one of John's) floating around, but I 
don't know that it has ever all been consolidated into one easy-to-find, 
easy-to-use set of instructions that will work for just about anyone.

Maybe someone can provide, or has provided, a universal binary of 0.91.2 
  built against numpy 1.1?

Eric

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Numpy v1.1.0 not compatible with pylab in matplotlib 0.9.1

2008-05-28 Thread John Hunter
On Wed, May 28, 2008 at 1:21 PM, Eric Firing [EMAIL PROTECTED] wrote:

 Maybe someone can provide, or has provided, a universal binary of 0.91.2
  built against numpy 1.1?

Does it need to be built against numpy 1.1?  I thought the 1.1 release
was binary compatible.
If it is, this egg should work:

http://downloads.sourceforge.net/matplotlib/matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg?use_mirror=internap

JDH

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Numpy v1.1.0 not compatible with pylab in matplotlib 0.9.1

2008-05-28 Thread Tommy Grav

On May 28, 2008, at 2:27 PM, John Hunter wrote:

 On Wed, May 28, 2008 at 1:21 PM, Eric Firing [EMAIL PROTECTED]  
 wrote:

 Maybe someone can provide, or has provided, a universal binary of  
 0.91.2
 built against numpy 1.1?

 Does it need to be built against numpy 1.1?  I thought the 1.1 release
 was binary compatible.
 If it is, this egg should work:

 http://downloads.sourceforge.net/matplotlib/matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg?use_mirror=internap

 JDH

The problem with the egg is that it installs it in /Library/Python/2.5/ 
site-packages. This is only valid
for the standard apple python version. But with

easy_install -d /Library/Frameworks/Python.framework/Versions/Current/ 
lib/python2.5/site-packages matplotlib-0.91.2-py2.5-macosx-10.3-fat.egg

I was able to get 0.91.2 on my system :)

Thanks
   Tommy

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Numpy v1.1.0 not compatible with pylab in matplotlib 0.9.1

2008-05-28 Thread Tommy Grav

On May 28, 2008, at 2:21 PM, Eric Firing wrote:

 Building on the Mac seems to be a nightmare.  There are various emails
 and howto writeups (including one of John's) floating around, but I
 don't know that it has ever all been consolidated into one easy-to- 
 find,
 easy-to-use set of instructions that will work for just about anyone.

 Maybe someone can provide, or has provided, a universal binary of  
 0.91.2
  built against numpy 1.1?

I seemed to remember that I had similar problems with 0.91.1, but used
the super-scipy package to install it. Of course that package is now  
only
for intel macs :(

Hopefully someone else can shed some light on the issue. I will play  
around
in the mean time and maybe I will stumble upon something :)

Cheers
   Tommy

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Numpy v1.1.0 not compatible with pylab in matplotlib 0.9.1

2008-05-28 Thread Christopher Barker
Tommy Grav wrote:
 I
 don't know that it has ever all been consolidated into one easy-to- 
 find, easy-to-use set of instructions that will work for just about anyone.

no, it hasn't.

However, I think:

$ easy-install matplotlib

should work, at least with the python.org python2.5

 Maybe someone can provide, or has provided, a universal binary of  
 0.91.2  built against numpy 1.1?

does it need to be built against numpy at all? I didn't think it was a 
build-time dependency -- that is, any MPL 0.91.2 should do, and you can 
drop a new numpy into it. I don't know if there is one yet, though...

 I seemed to remember that I had similar problems with 0.91.1, but used
 the super-scipy package to install it. Of course that package is now  
 only for intel macs :(

There was talk of making it Universal, but I don't know what came of that.

There are essentially two options:

1) built it just for yourself -- I think the instructions John H. posted 
are pretty easy to follow.

2) Built so that it is re-distributable, as part of a py2app *.app, for 
instance. In this case, you need to find or build the dependencies as 
Universal static libs, then make sure that those are linked when you 
build. You should also probably use the python.org build of python, 
rather than Apple's one. I don't know that there are easy instructions 
for this anywhere, but Russel Owen did post some somewhere a while back.

2b) built against the Universal Frameworks found here:

http://www.kyngchaos.com/wiki/software:frameworks
(I think FreeType and UnixImageIO should do it).

That will give you a Universal build that you can use with py2app, but 
if anyone else wants to use that build, they'll need to install those 
frameworks too.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[EMAIL PROTECTED]

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Numpy v1.1.0 not compatible with pylab in matplotlib 0.9.1

2008-05-28 Thread Eric Firing
Christopher Barker wrote:
 Tommy Grav wrote:
 I
 don't know that it has ever all been consolidated into one easy-to- 
 find, easy-to-use set of instructions that will work for just about anyone.
 
 no, it hasn't.
And one of the reasons may be that it is very complicated in practice, 
with all the possible variations of OSX versions, Xcode versions, 
processor architectures, and styles of build for python itself and 
various libraries.  It seems to require learning a whole new jargon.
 
 However, I think:
 
 $ easy-install matplotlib
 
 should work, at least with the python.org python2.5
 
 Maybe someone can provide, or has provided, a universal binary of  
 0.91.2  built against numpy 1.1?
 
 does it need to be built against numpy at all? I didn't think it was a 
 build-time dependency -- that is, any MPL 0.91.2 should do, and you can 
 drop a new numpy into it. I don't know if there is one yet, though...

_backend_gdk.c and nxutils.c both call into the numpy C API; maybe some 
c++ code does also.  It is not entirely clear to me whether 1.1 is 
sufficiently binary-compatible that this is safe.


 There are essentially two options:
 
 1) built it just for yourself -- I think the instructions John H. posted 
 are pretty easy to follow.

That's the way they look, but having watched someone try it, I can 
testify that looks are deceptive.  I would say that with 95% 
probability, if Tommy tried to follow John's instructions, he would not 
succeed.

Eric

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users