<p dir="auto">I have tried both the methods.<br>
I am using Ubuntu 12.04 (32bit) with python 2.7.3, numpy 1.6.1, scipy 0.9.0</p>
<p dir="auto">I first installed using apt-get install python-sklearn. But there were many failures from both the methods. Then I remove python-sklearn with apt-get remove python-sklearn. Then I tried installing it from the source package using</p>
<p dir="auto"><code class="notranslate">python setup.py build</code><br>
<code class="notranslate">sudo python setup.py install</code></p>
<p dir="auto">When I tried running the nose test, it failed (the error is shown below).</p>
<p dir="auto">-------------------------------------------------------------------------ERROR trace1---------------------------------------------------------------------------</p>
<p dir="auto">~/OpenSource$ nosetests sklearn --exe</p>
<h1 dir="auto">E</h1>
<p dir="auto">ERROR: Failure: ImportError (No module named _check_build</p>
<hr>
<p dir="auto">Contents of /home/manaswi/OpenSource/scikit-learn-0.13.1/sklearn/<strong>check_build:<br>
_check_build.pyx          __init</strong>.pyc              _check_build.c<br>
<strong>init</strong>.py               setup.pyc                 setup.py</p>
<hr>
<p dir="auto">It seems that scikit-learn has not been built correctly.</p>
<p dir="auto">If you have installed scikit-learn from source, please do not forget to build the package before using it: run <code class="notranslate">python setup.py install</code> or <code class="notranslate">make</code> in the source directory. If you have used an installer, please check that it is suited for your Python version, your operating system and your platform.</p>
<hr>
<p dir="auto">Traceback (most recent call last):<br>
File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 390, in loadTestsFromName<br>
addr.filename, addr.module)<br>
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 39, in importFromPath<br>
return self.importFromDir(dir_path, fqname)<br>
File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 86, in importFromDir<br>
mod = load_module(part_fqname, fh, filename, desc)<br>
File "/home/manaswi/OpenSource/scikit-learn-0.13.1/sklearn/<strong>init</strong>.py", line 31, in <br>
from . import <strong>check_build<br>
File "/home/manaswi/OpenSource/scikit-learn-0.13.1/sklearn/__check_build/__init</strong>.py", line 47, in <br>
raise_build_error(e)<br>
File "/home/manaswi/OpenSource/scikit-learn-0.13.1/sklearn/<strong>check_build/__init</strong>.py", line 42, in raise_build_error<br>
%s""" % (e, local_dir, ''.join(dir_content).strip(), msg))<br>
ImportError: No module named _check_build</p>
<hr>
<p dir="auto">Contents of /home/manaswi/OpenSource/scikit-learn-0.13.1/sklearn/<strong>check_build:<br>
_check_build.pyx          __init</strong>.pyc              _check_build.c<br>
<strong>init</strong>.py               setup.pyc                 setup.py</p>
<hr>
<p dir="auto">It seems that scikit-learn has not been built correctly.</p>
<p dir="auto">If you have installed scikit-learn from source, please do not forget to build the package before using it: run <code class="notranslate">python setup.py install</code> or <code class="notranslate">make</code> in the source directory. If you have used an installer, please check that it is suited for your<br>
Python version, your operating system and your platform.</p>
<hr>
<p dir="auto">Ran 1 test in 0.001s</p>
<p dir="auto">FAILED (errors=1)</p>
<hr>
<p dir="auto"><strong>Then I installed sklearn package again. I tried the nosetests as well with python -c "import sklearn; sklearn.test()".<br>
The errors are shown below:</strong></p>
<p dir="auto">-------------------------------------------------------------------------ERROR trace2---------------------------------------------------------------------------<br>
~/OpenSource$ nosetests sklearn --exe<br>
.............................................................../usr/local/lib/python2.7/dist-packages/sklearn/manifold/spectral_embedding.py:225: UserWarning: Graph is not fully connected, spectral embedding may not works as expected.<br>
warnings.warn("Graph is not fully connected, spectral embedding"<br>
...........SS...............S.....................................................S.........................................................S................................................................../usr/local/lib/python2.7/dist-packages/sklearn/externals/joblib/test/test_func_inspect.py:122: UserWarning: Cannot inspect object &lt;functools.partial object at 0xcee2fa4&gt;, ignore list will not work.<br>
nose.tools.assert_equal(filter_args(ff, ['y'], (1, )),</p>
<h1 dir="auto">............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................S...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F....................................................................................SSS....S....S...................................................................................................................................</h1>
<h2 dir="auto">FAIL: sklearn.tests.test_common.test_transformers</h2>
<p dir="auto">Traceback (most recent call last):<br>
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest<br>
self.test(*self.arg)<br>
File "/usr/local/lib/python2.7/dist-packages/sklearn/tests/test_common.py", line 230, in test_transformers<br>
"fit_transform not correct in %s" % Trans)<br>
File "/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 800, in assert_array_almost_equal<br>
header=('Arrays are not almost equal to %d decimals' % decimal))<br>
File "/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 636, in assert_array_compare<br>
raise AssertionError(msg)<br>
AssertionError:<br>
Arrays are not almost equal to 2 decimals<br>
fit_transform not correct in &lt;class 'sklearn.pls.CCA'&gt;<br>
(mismatch 50.0%)<br>
x: array([[ 0.97459066, -0.37275475],<br>
[-0.97199043,  0.22191067],<br>
[-0.97199043,  0.22191067],...<br>
y: array([[  9.74590662e-01,  -8.38417465e-16],<br>
[ -9.71990427e-01,   4.91932783e-16],<br>
[ -9.71990427e-01,   4.91932783e-16],...</p>
<hr>
<p dir="auto">Ran 1603 tests in 90.243s</p>
<p dir="auto">FAILED (SKIP=11, failures=1)</p>
<hr>
<p dir="auto">*<em>Trying with python -c "import sklearn; sklearn.test()" gave me the following: *</em></p>
<hr>
<p dir="auto">-------------------------------------------------------------------------ERROR trace3---------------------------------------------------------------------------<br>
~/OpenSource$ python -c "import sklearn; sklearn.test()"</p>
<p dir="auto">Other than the Doctest failures, I get the following error:</p>
<h1 dir="auto"></h1>
<h2 dir="auto">FAIL: sklearn.tests.test_common.test_transformers</h2>
<p dir="auto">Traceback (most recent call last):<br>
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest<br>
self.test(*self.arg)<br>
File "/usr/local/lib/python2.7/dist-packages/sklearn/tests/test_common.py", line 237, in test_transformers<br>
"fit_transform not correct in %s" % Trans)<br>
File "/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 800, in assert_array_almost_equal<br>
header=('Arrays are not almost equal to %d decimals' % decimal))<br>
File "/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 600, in assert_array_compare<br>
raise AssertionError(msg)<br>
AssertionError:<br>
Arrays are not almost equal to 2 decimals<br>
fit_transform not correct in &lt;class 'sklearn.decomposition.kernel_pca.KernelPCA'&gt;<br>
(shapes (30, 20), (30, 18) mismatch)<br>
x: array([[  1.87664949e+00,   8.57398986e-02,   4.20312700e-02,<br>
3.63938109e-08,   0.00000000e+00,   0.00000000e+00,<br>
0.00000000e+00,   0.00000000e+00,   0.00000000e+00,...<br>
y: array([[  1.87664949e+00,   8.57398986e-02,   4.20312700e-02,<br>
-3.35096502e-08,  -5.65023583e-09,   6.94581104e-09,<br>
1.93372216e-08,   7.76708475e-09,   4.25320650e-08,...</p>
<hr>
<p dir="auto">Ran 1737 tests in 270.588s</p>
<p dir="auto">FAILED (SKIP=11, errors=21, failures=15)</p>
<hr>
<p dir="auto">How should I resolve this?</p>
<p dir="auto">In <code class="notranslate">test_transformers</code> CCA's <code class="notranslate">fit_transform</code> fails for me on 32bit ubuntu. Anyone else?</p>