[Numpy-discussion] A memory problem: why does mmap come up in numpy.inner?
Thu Jun 5 01:24:26 CDT 2008
Jonathan Wright wrote:
> Dan Yamins wrote:
>> On Wed, Jun 4, 2008 at 9:06 PM, Charles R Harris
>> <firstname.lastname@example.org <mailto:email@example.com>> wrote:
>> Are both python and your version of OS X fully 64 bits?
>> I'm not sure.
> >From python:
> python2.5 -c 'import platform;print platform.architecture()'
> ('32bit', 'ELF')
> versus :
> ('64bit', 'ELF')
> You can also try the unix file command (eg: from a terminal):
as described in the other email in this thread about an hour ago I did
build python 2.5.2 on OSX in 64 bit mode. As is the ctypes extension
does not build due to libffi being too old. I manually got it to build
[hackish, long story, details will go to the python dev list in a couple
days] and now it works, i.e. twisted works correctly and the Sage
notebook which depends on twisted passes doctests.
> $ file `which python2.5`
> /sware/exp/fable/standalone/redhate4-a64/bin/python: ELF 64-bit LSB
> executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0,
> dynamically linked (uses shared libs), not stripped
> ...etc. We needed this for generating the .so library file name for
> ctypes, and got the answer from comp.lang.python. I hope it also works
> for OS X.
Can you elaborate on this a little? I have a 64 bit python 2.5.2 and
ctypes imports fine:
bsd:64bitnumpy mabshoff$ file `which python`
/Users/mabshoff/64bitnumpy/python-2.5.2-bin/bin//python: Mach-O 64-bit
bsd:64bitnumpy mabshoff$ python
Python 2.5.2 (r252:60911, Jun 4 2008, 21:59:02)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import _ctypes
But since I manually build it and copied it over python might not
"know" it exists [excuse much lack of python-internals foo here]. Since
I tested numpy-1.1 before I copied over the ctypes extension I deleted
numpy-1.1 from site-packages and rebuild from fresh sources, but despite
the ctypes extension existing and working it still fails the numpy
<SNIP other tests>
Found 5/5 tests for numpy.tests.test_ctypeslib
<SNIP many dots>ctypes is not available on this python: skipping the
test (import error was: ctypes is not available.)
Ran 1275 tests in 1.235s
I am not what I would call familiar with numpy internals, so is there a
magic thing I can do to make numpy aware that ctypes exists? I am
willing to find out myself, but do not have the time today to go off and
spend a day or two on this, especially if somebody on the list can just
point me to the right spot ;)
Any input is appreciated.
> Numpy-discussion mailing list
More information about the Numpy-discussion