I've installed python27 using MacPorts and have added the /opt/local/bin path to the PATH variable. When I execute which python
I get the one installed at /opt/local/bin
which is fine. However , I installed nose using easy_install and nosetests now is installed in /usr/local/bin. There is a nosetests-2.7 in /opt/local/bin as well. I've tried running that one:
/opt/local/bin/nosetests-2.7 --exe sklearn
However, after a bunch of warnings and successful tests I end up getting the following:
ERROR: sklearn.cluster.bicluster.tests.test_utils.test_get_submatrix
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/nose-1.3.0-py2.7.egg/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sklearn/cluster/bicluster/tests/test_utils.py", line 43, in test_get_submatrix
assert_true(np.all(X != -1))
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 422, in assertTrue
if not expr:
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/sparse/base.py", line 183, in __bool__
raise ValueError("The truth value of an array with more than one "
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all().
----------------------------------------------------------------------
Ran 1715 tests in 112.607s
FAILED (SKIP=16, errors=1)
Not sure why File "/Library/Python/2.7/site-packages/nose-1.3.0-py2.7.egg/nose/case.py"
is being executed when I clearly ran the nosetests from /opt/local/bin directory.
Any help on this would be really appreciated!
UPDATE:
Results of: python -c 'import sys; print(sys.path)'
"['', '/Library/Python/2.7/site-packages/nose-1.3.0-py2.7.egg', '/Library/Python/2.7/site-packages/Theano-0.6.0-py2.7.egg', '/Library/Python/2.7/site-packages/scipy-0.13.2-py2.7-macosx-10.8-intel.egg', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages', '/Library/Python/2.7/site-packages']"