<p dir="auto">Hi,</p>
<p dir="auto">I've tried to install Scikits-Learn both from sources and using easy_install on a Mac OS X 10.6.8 system, however the installation seems to be broken as when I load the sklearn module in Python, the sklearn.cluster and other core modules are not available.</p>
<p dir="auto">When running the test routine, sklearn.test() the test procedure produces an exception with the output listed below, are there any particular steps to the installation on a Mac, other than the ones listes in the project's website. Thank's in advance for the support.</p>
<p dir="auto">Regards,<br>
Hugo</p>
<p dir="auto">setup numpy_pickle</p>
<hr>
<p dir="auto">.....................................Exception AttributeError: AttributeError("'NoneType' object has no attribute 'tell'",) in &lt;bound method memmap.<strong>del</strong> of memmap(1.5e-323)&gt; ignored<br>
Exception AttributeError: AttributeError("'NoneType' object has no attribute 'tell'",) in &lt;bound method memmap.<strong>del</strong> of memmap(1.5e-323)&gt; ignored<br>
Exception AttributeError: AttributeError("'NoneType' object has no attribute 'tell'",) in &lt;bound method memmap.<strong>del</strong> of memmap(1.5e-323)&gt; ignored<br>
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.6-intel.egg/sklearn/externals/joblib/test/test_numpy_pickle.py:179: Warning: file "/var/folders/bF/bFAV1CtXGqWadLXrHkrQVk+++TI/-Tmp-/tmpReSj2S/test.pkl437" appears to be a zip, ignoring mmap_mode "r" flag passed<br>
numpy_pickle.load(this_filename, mmap_mode='r')<br>
Exception AttributeError: AttributeError("'NoneType' object has no attribute 'tell'",) in &lt;bound method memmap.<strong>del</strong> of memmap(1.5e-323)&gt; ignored<br>
....________________________________________________________________________________<br>
teardown numpy_pickle</p>
<hr>
<p dir="auto">............An unexpected error occurred while tokenizing input<br>
The following traceback may be corrupted or invalid<br>
The error message is: ('EOF in multi-line statement', (38, 0))</p>
<h1 dir="auto">.........................................................................................S.........................................................................................................................................................................................................FEFEFE............................................................................EEE...................................................................................................................................................................EE</h1>
<h2 dir="auto">ERROR: Doctest: sklearn.datasets.base.load_sample_images</h2>
<p dir="auto">Traceback (most recent call last):<br>
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose-1.1.2-py2.7.egg/nose/plugins/doctests.py", line 395, in tearDown<br>
delattr(builtin_mod, self._result_var)<br>
AttributeError: _</p>
<h1 dir="auto"></h1>
<p dir="auto">ERROR: An unexpected error occurred while tokenizing input<br>
The following traceback may be corrupted or invalid<br>
The error message is: ('EOF in multi-line statement', (47, 0))</p>
<p dir="auto">OS - Mac OS X 10.6.8</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="python -c &quot;import sklearn; sklearn.test()&quot;
Running unit tests and doctests for sklearn
NumPy version 1.5.1
NumPy is installed in /Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/numpy
Python version 2.7.1 |EPD 7.0-2 (32-bit)| (r271:86832, Dec  3 2010, 15:41:32) [GCC 4.0.1 (Apple Inc. build 5488)]
nose version 1.0.0
/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/cross_val.py:2: UserWarning: sklearn.cross_val namespace is deprecated in version 0.9 and will be removed in version 0.11. Please use sklearn.cross_validation instead.
  warnings.warn('sklearn.cross_val namespace is deprecated in version 0.9'
/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/hmm.py:24: UserWarning: sklearn.hmm is orphaned, undocumented and has known numerical stability issues. If nobody volunteers to write documentation and make it more stable, this module will be removed in version 0.11.
  warnings.warn('sklearn.hmm is orphaned, undocumented and has known numerical'
.........../Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/neighbors/base.py:23: UserWarning: kneighbors: neighbor k+1 and neighbor k have the same distance: results will be dependent on data order.
  warnings.warn(msg)
................................/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/cluster/spectral.py:77: UserWarning: pyamg not available, using scipy.sparse
  warnings.warn('pyamg not available, using scipy.sparse')
.S...................E..SS...................................../Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/decomposition/dict_learning.py:262: UserWarning: Please note: the interface of sparse_encode has changed: It now follows the dictionary learning API and it also handles parallelization. Please read the docstring for more information.
  warnings.warn(&quot;Please note: the interface of sparse_encode has changed: &quot;
.........S........................./Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/decomposition/nmf.py:237: UserWarning: Iteration limit reached in nls subproblem.
  warnings.warn(&quot;Iteration limit reached in nls subproblem.&quot;)
.................../Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/decomposition/sparse_pca.py:147: RuntimeWarning: invalid value encountered in divide
  U /= np.sqrt((U ** 2).sum(axis=0))
.....S...../Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/ensemble/forest.py:309: RuntimeWarning: divide by zero encountered in log
  return np.log(self.predict_proba(X))
....................../Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/externals/joblib/test/test_func_inspect.py:111: UserWarning: Cannot inspect object &lt;functools.partial object at 0x1a8a76c0&gt;, ignore list will not work.
  nose.tools.assert_equal(filter_args(ff, ['y'], 1),
........................................................................................________________________________________________________________________________
test_memory setup
________________________________________________________________________________
________________________________________________________________________________
test_memory teardown
________________________________________________________________________________
..________________________________________________________________________________
test_memory setup
________________________________________________________________________________
.........................................................................................................................________________________________________________________________________________
test_memory teardown
________________________________________________________________________________
.________________________________________________________________________________
setup numpy_pickle
________________________________________________________________________________
.....................................Exception AttributeError: AttributeError(&quot;'NoneType' object has no attribute 'tell'&quot;,) in &lt;bound method memmap.__del__ of memmap(2.8286046898131197e-183)&gt; ignored
Exception AttributeError: AttributeError(&quot;'NoneType' object has no attribute 'tell'&quot;,) in &lt;bound method memmap.__del__ of memmap(2.20861708294445e-183)&gt; ignored
/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/externals/joblib/test/test_numpy_pickle.py:179: Warning: file &quot;/var/folders/AL/ALAqpXbxHs44xCiaqcTiZk+++TI/-Tmp-/tmpJXhrg2/test.pkl577&quot; appears to be a zip, ignoring mmap_mode &quot;r&quot; flag passed
  numpy_pickle.load(this_filename, mmap_mode='r')
Exception AttributeError: AttributeError(&quot;'NoneType' object has no attribute 'tell'&quot;,) in &lt;bound method memmap.__del__ of memmap(5.563520520564929e-185)&gt; ignored
....________________________________________________________________________________
teardown numpy_pickle
________________________________________________________________________________
............An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (39, 0))

.........................................................................................S.........................................................................................................................................................................................................FEFEFE............................................................................EEE...................................................................................................................................................................EE
======================================================================
ERROR: Doctest: sklearn.datasets.base.load_sample_images
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/nose/plugins/doctests.py&quot;, line 395, in tearDown
    delattr(__builtin__, self._result_var)
AttributeError: _

======================================================================"><pre class="notranslate"><code class="notranslate">python -c "import sklearn; sklearn.test()"
Running unit tests and doctests for sklearn
NumPy version 1.5.1
NumPy is installed in /Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/numpy
Python version 2.7.1 |EPD 7.0-2 (32-bit)| (r271:86832, Dec  3 2010, 15:41:32) [GCC 4.0.1 (Apple Inc. build 5488)]
nose version 1.0.0
/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/cross_val.py:2: UserWarning: sklearn.cross_val namespace is deprecated in version 0.9 and will be removed in version 0.11. Please use sklearn.cross_validation instead.
  warnings.warn('sklearn.cross_val namespace is deprecated in version 0.9'
/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/hmm.py:24: UserWarning: sklearn.hmm is orphaned, undocumented and has known numerical stability issues. If nobody volunteers to write documentation and make it more stable, this module will be removed in version 0.11.
  warnings.warn('sklearn.hmm is orphaned, undocumented and has known numerical'
.........../Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/neighbors/base.py:23: UserWarning: kneighbors: neighbor k+1 and neighbor k have the same distance: results will be dependent on data order.
  warnings.warn(msg)
................................/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/cluster/spectral.py:77: UserWarning: pyamg not available, using scipy.sparse
  warnings.warn('pyamg not available, using scipy.sparse')
.S...................E..SS...................................../Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/decomposition/dict_learning.py:262: UserWarning: Please note: the interface of sparse_encode has changed: It now follows the dictionary learning API and it also handles parallelization. Please read the docstring for more information.
  warnings.warn("Please note: the interface of sparse_encode has changed: "
.........S........................./Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/decomposition/nmf.py:237: UserWarning: Iteration limit reached in nls subproblem.
  warnings.warn("Iteration limit reached in nls subproblem.")
.................../Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/decomposition/sparse_pca.py:147: RuntimeWarning: invalid value encountered in divide
  U /= np.sqrt((U ** 2).sum(axis=0))
.....S...../Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/ensemble/forest.py:309: RuntimeWarning: divide by zero encountered in log
  return np.log(self.predict_proba(X))
....................../Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/externals/joblib/test/test_func_inspect.py:111: UserWarning: Cannot inspect object &lt;functools.partial object at 0x1a8a76c0&gt;, ignore list will not work.
  nose.tools.assert_equal(filter_args(ff, ['y'], 1),
........................................................................................________________________________________________________________________________
test_memory setup
________________________________________________________________________________
________________________________________________________________________________
test_memory teardown
________________________________________________________________________________
..________________________________________________________________________________
test_memory setup
________________________________________________________________________________
.........................................................................................................................________________________________________________________________________________
test_memory teardown
________________________________________________________________________________
.________________________________________________________________________________
setup numpy_pickle
________________________________________________________________________________
.....................................Exception AttributeError: AttributeError("'NoneType' object has no attribute 'tell'",) in &lt;bound method memmap.__del__ of memmap(2.8286046898131197e-183)&gt; ignored
Exception AttributeError: AttributeError("'NoneType' object has no attribute 'tell'",) in &lt;bound method memmap.__del__ of memmap(2.20861708294445e-183)&gt; ignored
/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/scikit_learn-0.10-py2.7-macosx-10.5-i386.egg/sklearn/externals/joblib/test/test_numpy_pickle.py:179: Warning: file "/var/folders/AL/ALAqpXbxHs44xCiaqcTiZk+++TI/-Tmp-/tmpJXhrg2/test.pkl577" appears to be a zip, ignoring mmap_mode "r" flag passed
  numpy_pickle.load(this_filename, mmap_mode='r')
Exception AttributeError: AttributeError("'NoneType' object has no attribute 'tell'",) in &lt;bound method memmap.__del__ of memmap(5.563520520564929e-185)&gt; ignored
....________________________________________________________________________________
teardown numpy_pickle
________________________________________________________________________________
............An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (39, 0))

.........................................................................................S.........................................................................................................................................................................................................FEFEFE............................................................................EEE...................................................................................................................................................................EE
======================================================================
ERROR: Doctest: sklearn.datasets.base.load_sample_images
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/nose/plugins/doctests.py", line 395, in tearDown
    delattr(__builtin__, self._result_var)
AttributeError: _

======================================================================
</code></pre></div>