[Python-talk] mat3d error

Python python at venix.com
Fri Sep 12 13:07:15 EDT 2008


On Fri, 2008-09-12 at 12:16 -0400, Labitt, Bruce wrote:
> maxint reports back 9223372036854775807 that is 64 bits?
> 2**63 ==> is really close to that number, so I'd say it was 64 bit.

Sounds right to me.

The ldd command simply reported the libraries that the 64bit python was
using, *not* the python package location.  That appears to still
be /usr/lib/python2.4

So an error with improper type on an integer suggests it could be some
kind of 32/64 mismatch.

I'm still in the stone age with a 32 bit system.  

There should be some way to scan the compiled files within
the /usr/lib/python2.4/site-packages directory to look for 32bit
binaries.  That would seem a likely culprit.

cd /usr/lib/python2.5/site-packages
(I'm on the newer version)

I tried
> find -name '*.so' | head | xargs ldd
                    ^^^^^^^
used head just to limit the output
and got:
> ./posix1e.so:
> ldd: warning: you do not have execution permission for `./posix1e.so'
>         linux-gate.so.1 =>  (0x00110000)
>         libacl.so.1 => /lib/libacl.so.1 (0x00118000)
>         libpython2.5.so.1.0 => /usr/lib/libpython2.5.so.1.0 (0x0011f000)
>         libpthread.so.0 => /lib/libpthread.so.0 (0x00266000)
>         libc.so.6 => /lib/libc.so.6 (0x0027f000)
>         libattr.so.1 => /lib/libattr.so.1 (0x003d8000)
>         libdl.so.2 => /lib/libdl.so.2 (0x003dd000)
>         libutil.so.1 => /lib/libutil.so.1 (0x003e2000)
>         libm.so.6 => /lib/libm.so.6 (0x003e6000)
>         /lib/ld-linux.so.2 (0x00569000)
> ./_bibtex.so:
>         linux-gate.so.1 =>  (0x00110000)
>         libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x00130000)
>         librecode.so.0 => /usr/lib/librecode.so.0 (0x001fb000)

Hopefully, ldd would let you see if you were running 64 bit binaries.
Perhaps there is a better way.

> 
> -----Original Message-----
> From: python-talk-bounces at dlslug.org
> [mailto:python-talk-bounces at dlslug.org] On Behalf Of Labitt, Bruce
> Sent: Friday, September 12, 2008 11:49 AM
> To: Python
> Cc: python-talk at dlslug.org
> Subject: Re: [Python-talk] mat3d error
> 
> What would a 64 bit python look like?
> 
> This is what I have:
> $ python
> Python 2.4.3 (#1, Mar 13, 2008, 13:35:20)
> [GCC 4.1.2 20070626 (Redhat 4.1.2-14)] on linux2
> Type "help", "copyright" ... for more information.
> >>>
> 
> -Bruce
> 
> -----Original Message-----
> From: Python [mailto:python at venix.com] 
> Sent: Friday, September 12, 2008 11:39 AM
> To: Labitt, Bruce
> Cc: python-talk at dlslug.org
> Subject: RE: [Python-talk] mat3d error
> 
> 
> On Fri, 2008-09-12 at 10:28 -0400, Labitt, Bruce wrote:
> > If I type 
> > $which python  I get
> > /usr/bin/python
> > 
> Yeah, but when you run that python, do you get the 32bit version or the
> 64bit version?
> 
> -----------------------------------------------
> python
> Python 2.5.1 (r251:54863, Jul 10 2008, 17:24:48) 
> [GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import os
> >>> os.__file__
> '/usr/lib/python2.5/os.pyc'
> >>> 
> (exited with Ctrl-D)
> -------------------------------------------------
> I expect that you are running the 32bit python by default.  Importing a
> module and checking its __file__ attribute should make it clear.  There
> are other, smarter ways to know your platform, but I don't remember them
> off the top of my head.
> 
> > $ cat /usr/bin/easy_install  is the same as yours, with the exception
> of
> > version number.
> > 
> > #!/usr/bin/python
> > # EASY-INSTALL-ENTRY-SCRIPT:
> > 'setuptools==0.6c5','console_scripts','easy_install'
> > __requires__ = 'setuptools==0.6c5'
> > import sys
> > from pkg_resources import load_entry_point
> > 
> > sys.exit(
> >    load_entry_point('setuptools==0.6c5', 'console_scripts',
> > 'easy_install')()
> > )
> > 
> > So this is OK?
> > 
> > 
> > -----Original Message-----
> > From: Python [mailto:python at venix.com] 
> > Sent: Friday, September 12, 2008 10:21 AM
> > To: Labitt, Bruce
> > Cc: python-talk at dlslug.org
> > Subject: RE: [Python-talk] mat3d error
> > 
> > 
> > On Fri, 2008-09-12 at 10:09 -0400, Labitt, Bruce wrote:
> > > OK, I just found something funky.  I have python spread out over too
> > > places - i.e, I have a python in /usr/lib AND in /usr/lib64 !!!  
> > > 
> > > I think I'd like it only in lib64.  So I have site-packages in both
> > > locations...
> > > 
> > > Umm, how do I clean this up?
> > > 
> > > # ldd /usr/bin/python reveals
> > >    things are in /lib64
> > > 
> > > But when I used easy_install, it put stuff into 
> > >    /usr/lib/python2.4/site-packages
> > > 
> > My easy_install looks like:
> >
> ------------------------------------------------------------------------
> > -------
> > cat /usr/bin/easy_install
> > #!/usr/bin/python
> > # EASY-INSTALL-ENTRY-SCRIPT:
> > 'setuptools==0.6c8','console_scripts','easy_install'
> > __requires__ = 'setuptools==0.6c8'
> > import sys
> > from pkg_resources import load_entry_point
> > 
> > sys.exit(
> >    load_entry_point('setuptools==0.6c8', 'console_scripts',
> > 'easy_install')()
> > )
> >
> ------------------------------------------------------------------------
> > -------
> > The first line (shebang) would seem to be the controlling factor.
> > 
> > When you type 
> > 	python
> > which python do you get?
> > 
> > > instead of /usr/lib64/python2.4/site-packages
> > > 
> > > ???
> > > 
> > > -Bruce
> > > 
> > > 
-- 
Lloyd Kvam
Venix Corp
DLSLUG/GNHLUG library
http://dlslug.org/library.html
http://www.librarything.com/catalog/dlslug
http://www.librarything.com/rsshtml/recent/dlslug
http://www.librarything.com/rss/recent/dlslug



More information about the Python-talk mailing list