[issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine

David Jones report at bugs.python.org
Sun Nov 24 01:12:45 CET 2013


David Jones added the comment:

Has there been any progress made on fixing this? I ran into this trying to install numpy via pip, 32-bit python installation on 64-bit Centos 6.4. It get's the compile flags right, but not the linker:

C compiler: gcc -pthread -fno-strict-aliasing -g -O2 -m32 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC
compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/opt/python/ia32/include/python2.7 -c'
gcc: _configtest.c
gcc -pthread _configtest.o -o _configtest
_configtest.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status

Someone worked around this by changing ccompiler.py, line 693 to:
runtime_library_dirs=None, debug=0, extra_preargs=['-m32'],

See: http://stackoverflow.com/questions/11265057/how-do-i-install-a-32-bit-version-of-numpy

I tried using the setarch command, which alters the output of uname, but it didn't change anything:
setarch i686 pip install numpy

This changes the output of uname from
Linux centos63-vm 2.6.32-358.23.2.el6.x86_64 #1 SMP Wed Oct 16 18:37:12 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

to 

Linux centos63-vm 2.6.32-358.23.2.el6.x86_64 #1 SMP Wed Oct 16 18:37:12 UTC 2013 i686 i686 i386 GNU/Linux

So if get_platform really depends on uname, then why doesn't this work?

----------
nosy: +djones

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18987>
_______________________________________


More information about the Python-bugs-list mailing list