-
-
Notifications
You must be signed in to change notification settings - Fork 25.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scikit-learn not installed correctly #4691
Comments
That doesn't look good. Can you check your numpy installation? How did you install numpy? |
What's the easiest way to validate my numpy installation? It was installed using pip - "pip install numpy". |
that is not what the installation instructions say ;) Did you run Maybe do |
Looks like my update was lost... We ran "yum -y install gcc gcc-c++ numpy python-devel scipy" as root, then ran "pip install numpy". Basically we followed instructions and all commands completed without errors. np.test() failed with "not defined" error. nosetests -sv numpy returned a number of errors,ERROR: test_umath.TestComplexFunctions.test_branch_cuts_failingTraceback (most recent call last): ERROR: test_umath_complex.TestCarg.test_zeroTraceback (most recent call last): ERROR: test_umath_complex.TestCexp.test_special_values2Traceback (most recent call last): ERROR: test_special_values (test_umath_complex.TestClog)Traceback (most recent call last): ERROR: Failure: ImportError (cannot import name fib2)Traceback (most recent call last): ERROR: Failure: ImportError (cannot import name foo)Traceback (most recent call last): ERROR: Failure: ImportError (cannot import name fib3)Traceback (most recent call last): ERROR: Failure: ImportError (No module named primes)Traceback (most recent call last): ERROR: Failure: ImportError (cannot import name example)Traceback (most recent call last): ERROR: Failure: ImportError (cannot import name example2)Traceback (most recent call last): Ran 2489 tests in 5.311s FAILED (errors=10) |
I heard a lot good things about scikit-learn and also was told installation was bad. But I could not have expected it to be so difficult. |
This is not really an issue with scikit-learn, your numpy installation is faulty. If you want the easy way out, install anaconda from continuum.io: http://continuum.io/downloads |
btw if you just didn't upgrade your numpy using pip, it would probably also worked fine. Where in the instruction does it say to do |
Sorry. That was a typo. I ran pip to install scikit, not numpy, |
I've been working with our linux admin but installation has been surprisingly difficult so far, partly because the prerequisites on our system maybe too old and it's not easy to upgrade. Is there a windows version that can be installed with just a few clicks, like R or octave. I'd like to try that before giving up on scikit. |
As mentionned everywhere, including by @amueller, you should install |
Not sure that won't cause any conflict in our environment but I can try that when we create new environments. Thanks. |
Not sure that won't cause any conflict in our environment but I can try that
when we create new environments
Your environemnent seems to be buggy / too old. I my opinion, it doesn't
seem like a robust working environment.
|
Unfortunately we have existing scripts that depend on what's already installed. Btw, is the 32-bit version of Anaconda more stable than 64-bit? I've heard some issues with the 64-bit version. |
I have never heard of issues with the 64 bit version. How do you have a choice of "giving up on scikit" if you depend on existing scripts? That seems slightly contradictory. |
just to be clear: you can install anaconda in your home folder and use it for all your scientific python needs without having ever to talk to an admin or any other python user on this machine. |
That did sound somewhat contradictory. "existing scripts" are non-scipy/numpy/scikit. Thanks for the help. |
well if they are non-scipy/numpy/scikit then there shouldn't be a problem with upgrading to anaconda, right? |
I don't know enough about Anaconda. If it's 100% compatible with what we have, yes it should be ok to upgrade. Will definitely look into that. |
closing as old / numpy install problems |
I followed instructions to install scikit-learn on my redhat linux server,
http://scikit-learn.org/stable/install.html
Installation completed successfully. However the ensuing test failed, Is this a known problem?
$ nosetests sklearn --exe
......
Call-back cb_calcfc_in__cobyla__user__routines failed.
Ecapi_return is NULL
Call-back cb_calcfc_in__cobyla__user__routines failed.
Ecapi_return is NULL
Call-back cb_calcfc_in__cobyla__user__routines failed.
E.capi_return is NULL
Call-back cb_calcfc_in__cobyla__user__routines failed.
Ecapi_return is NULL
Call-back cb_calcfc_in__cobyla__user__routines failed.
EEcapi_return is NULL
Call-back cb_calcfc_in__cobyla__user__routines failed.
EEEE....EEEEE.EE.EEE...E....E..EEEEEEEEE..EEE.....EEEEE.E.EE..EEEEEEEEEEE.E.E...EE....E.EEEE..EE.EEEE...........EEEEEEEEEEEEEEEEEEEE..........EEEEEEEEEE..EEEEETracebackmost recent call last):
File "/usr/bin/nosetests", line 8, in
load_entry_point('nose==0.10.4', 'console_scripts', 'nosetests')()
File "/usr/lib/python2.6/site-packages/nose/core.py", line 219, in init
argv=argv, testRunner=testRunner, testLoader=testLoader)
File "/usr/lib64/python2.6/unittest.py", line 816, in init
self.runTests()
File "/usr/lib/python2.6/site-packages/nose/core.py", line 298, in runTests
result = self.testRunner.run(self.test)
File "/usr/lib/python2.6/site-packages/nose/core.py", line 62, in run
test(result)
File "/usr/lib/python2.6/site-packages/nose/suite.py", line 138, in call
return self.run(_arg, *_kw)
File "/usr/lib/python2.6/site-packages/nose/suite.py", line 168, in run
test(orig)
File "/usr/lib/python2.6/site-packages/nose/suite.py", line 138, in call
return self.run(_arg, *_kw)
File "/usr/lib/python2.6/site-packages/nose/suite.py", line 168, in run
test(orig)
File "/usr/lib/python2.6/site-packages/nose/suite.py", line 138, in call
return self.run(_arg, *_kw)
File "/usr/lib/python2.6/site-packages/nose/suite.py", line 168, in run
test(orig)
File "/usr/lib/python2.6/site-packages/nose/suite.py", line 138, in call
return self.run(_arg, *_kw)
File "/usr/lib/python2.6/site-packages/nose/suite.py", line 168, in run
test(orig)
File "/usr/lib/python2.6/site-packages/nose/suite.py", line 138, in call
return self.run(_arg, *_kw)
File "/usr/lib/python2.6/site-packages/nose/suite.py", line 168, in run
test(orig)
File "/usr/lib/python2.6/site-packages/nose/suite.py", line 138, in call
return self.run(_arg, *_kw)
File "/usr/lib/python2.6/site-packages/nose/suite.py", line 161, in run
for test in self._tests:
File "/usr/lib/python2.6/site-packages/nose/suite.py", line 283, in _get_wrapped_tests
for test in self._get_tests():
File "/usr/lib/python2.6/site-packages/nose/suite.py", line 79, in _get_tests
for test in self.test_generator:
File "/usr/lib/python2.6/site-packages/nose/loader.py", line 221, in generate
for test in g():
......
File "/home/oracle/.local/lib/python2.6/site-packages/sklearn/metrics/tests/test_common.py", line 918, in test_averaging_multilabel_all_zeroes
y_pred_binarize, is_multilabel=True)
File "/home/oracle/.local/lib/python2.6/site-packages/sklearn/utils/testing.py", line 300, in wrapper
return fn(_args, *_kwargs)
File "/home/oracle/.local/lib/python2.6/site-packages/sklearn/metrics/tests/test_common.py", line 817, in _check_averaging
label_measure = metric(y_true, y_pred, average=None)
File "/home/oracle/.local/lib/python2.6/site-packages/sklearn/metrics/tests/test_common.py", line 916, in
precision_score, y_true, y_score, average))
File "/home/oracle/.local/lib/python2.6/site-packages/sklearn/metrics/base.py", line 122, in _average_binary_score
sample_weight=score_weight)
File "/home/oracle/.local/lib/python2.6/site-packages/sklearn/metrics/classification.py", line 1082, in precision_score
sample_weight=sample_weight)
File "/home/oracle/.local/lib/python2.6/site-packages/sklearn/metrics/classification.py", line 912, in precision_recall_fscore_support
minlength=len(labels))
File "/home/oracle/.local/lib/python2.6/site-packages/sklearn/utils/fixes.py", line 345, in bincount
return np.bincount(x, weights, minlength)
TypeError: function takes at most 2 arguments (3 given)
......
The text was updated successfully, but these errors were encountered: