Sorry I can't run arch -32 nosetests on my mac, but I execute the function test_huge_allocations existing in test_tree.py solely using 32bit python (checked by sys.maxint), it still works.
It's pretty weird ... Best, Yen-Chen 2016-07-21 1:55 GMT+08:00 Matthew Brett <[email protected]>: > Hi, > > On Wed, Jul 20, 2016 at 6:37 PM, lin yenchen <[email protected]> > wrote: > > It's probably because I built it in a different way. > > > > Here is the steps for how I built it: > > > > Type arch -32 > > /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python -c > > "import sys; print sys.maxint" and make sure it outputs 2147483647. > > > > Modify line 5 of Makefile exists in root directory of scikit-learn > become: > > PYTHON ?= arch -32 > > /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python > > > > and modify line 11 to: > > BITS := $(shell PYTHON -c 'import struct; print(8 * > struct.calcsize("P"))') > > > > Type sudo make in the root directory of scikit-learn to build a 32 bit > > version. > > > > It reports OK and no test failures after sudo make complete. > > I think you are still testing the 64-bit code there. When I do: > > arch -32 python setup.py build > > then the build flags still ask for a dual arch build: > > clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 ... > > Later, when you run `nosetests` via the Makefile, it will load the > default 64-bit Python to do the tests. > > Specifically, I predict that you'll get a test error if you force > nosetests to use 32-bit Python: > > arch -32 nosetests sklearn.tree.tests.test_tree > > Cheers, > > Matthew > _______________________________________________ > scikit-learn mailing list > [email protected] > https://mail.python.org/mailman/listinfo/scikit-learn >
_______________________________________________ scikit-learn mailing list [email protected] https://mail.python.org/mailman/listinfo/scikit-learn
