Skip to content
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

test failed after installation in ubuntu12 #1808

Closed
xianping opened this issue Mar 25, 2013 · 19 comments
Closed

test failed after installation in ubuntu12 #1808

xianping opened this issue Mar 25, 2013 · 19 comments
Labels

Comments

@xianping
Copy link

I installed the package using 'apt-get install python-sklearn', and then tested it by using 'nosetests sklearn --exe', but failed. Error messages below:

ERROR: sklearn.datasets.tests.test_lfw.test_load_fake_lfw_people

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(_self.arg)
File "/usr/lib/pymodules/python2.7/sklearn/datasets/tests/test_lfw.py", line 120, in test_load_fake_lfw_people
min_faces_per_person=3)
File "/usr/lib/pymodules/python2.7/sklearn/datasets/lfw.py", line 337, in load_lfw_people
return fetch_lfw_people(download_if_missing=download_if_missing, *_kwargs)
File "/usr/lib/pymodules/python2.7/sklearn/datasets/lfw.py", line 266, in fetch_lfw_people
m = Memory(cachedir=lfw_home, compress=6, verbose=0)
TypeError: init() got an unexpected keyword argument 'compress'
-------------------- >> begin captured logging << --------------------
sklearn.datasets.lfw: INFO: Loading LFW people faces from /tmp/scikit_learn_lfw_test_yijxlU/lfw_home
--------------------- >> end captured logging << ---------------------

ERROR: sklearn.datasets.tests.test_lfw.test_load_fake_lfw_people_too_restrictive

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(_self.arg)
File "/usr/lib/python2.7/dist-packages/nose/tools.py", line 80, in newfunc
func(_arg, *_kw)
File "/usr/lib/pymodules/python2.7/sklearn/datasets/tests/test_lfw.py", line 149, in test_load_fake_lfw_people_too_restrictive
load_lfw_people(data_home=SCIKIT_LEARN_DATA, min_faces_per_person=100)
File "/usr/lib/pymodules/python2.7/sklearn/datasets/lfw.py", line 337, in load_lfw_people
return fetch_lfw_people(download_if_missing=download_if_missing, *_kwargs)
File "/usr/lib/pymodules/python2.7/sklearn/datasets/lfw.py", line 266, in fetch_lfw_people
m = Memory(cachedir=lfw_home, compress=6, verbose=0)
TypeError: init() got an unexpected keyword argument 'compress'
-------------------- >> begin captured logging << --------------------
sklearn.datasets.lfw: INFO: Loading LFW people faces from /tmp/scikit_learn_lfw_test_yijxlU/lfw_home
--------------------- >> end captured logging << ---------------------

ERROR: sklearn.datasets.tests.test_lfw.test_load_fake_lfw_pairs

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(_self.arg)
File "/usr/lib/pymodules/python2.7/sklearn/datasets/tests/test_lfw.py", line 158, in test_load_fake_lfw_pairs
lfw_pairs_train = load_lfw_pairs(data_home=SCIKIT_LEARN_DATA)
File "/usr/lib/pymodules/python2.7/sklearn/datasets/lfw.py", line 433, in load_lfw_pairs
return fetch_lfw_pairs(download_if_missing=download_if_missing, *_kwargs)
File "/usr/lib/pymodules/python2.7/sklearn/datasets/lfw.py", line 404, in fetch_lfw_pairs
m = Memory(cachedir=lfw_home, compress=6, verbose=0)
TypeError: init() got an unexpected keyword argument 'compress'
-------------------- >> begin captured logging << --------------------
sklearn.datasets.lfw: INFO: Loading train LFW pairs from /tmp/scikit_learn_lfw_test_yijxlU/lfw_home
--------------------- >> end captured logging << ---------------------


Ran 613 tests in 64.717s

FAILED (SKIP=6, errors=3)

ps: my environment :(lsb_release -a)
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise

@GaelVaroquaux
Copy link
Member

File "/usr/lib/pymodules/python2.7/sklearn/datasets/lfw.py", line 266, in
fetch_lfw_people
m = Memory(cachedir=lfw_home, compress=6, verbose=0)
TypeError: init() got an unexpected keyword argument 'compress'

That's very strange. It seems that you have an old version of joblib
lying some that gets imported. Could you check what you get when you do
'import joblib' in Python, and check that it is indeed the joblib module
that is packaged back the system. If it is not, you should remove it and
only rely on the system's package 'python-joblib'.

@xianping
Copy link
Author

I haven't encountered any problem when using 'import joblib'. using 'dpkg' to check what I installed the joblib, following messages show: " python-joblib 0.5.4-1 tools to provide lightweight pipelining in Python". I think I have no problem of package 'python-joblib', right? BTW, I tested some examples without errors. But I am still worrying about the future works. Could you help again?

@GaelVaroquaux
Copy link
Member

OK, so you have version 0.5.4 of joblib, installed by the system) and you are trying to use a recent version of the scikit (Which version? How did you install it?) that clearly requires a more recent version of joblib (compression was added in 0.6).

@amueller
Copy link
Member

@GaelVaroquaux But sklearn should always import joblib from externals, right? Why does it use the system version?

@GaelVaroquaux
Copy link
Member

The debian packagers have a modified version that imports the system joblib. I am suspecting a mess-up there.

@amueller
Copy link
Member

oh, alright.

@xianping
Copy link
Author

xianping commented Apr 1, 2013

Then, how do I update the joblib version to 0.6?

@GaelVaroquaux
Copy link
Member

Then, how do I update the joblib version to 0.6?

First, can you please tell us what is the package version for
python-joblib and python-sklearn. Also, can you give us the output of
apt-cache policy python-joblib
apt-cache policy python-sklearn

@xianping
Copy link
Author

xianping commented Apr 1, 2013

python-joblib, 0.5.4-1
python-sklearn, 0.10.0-1build1
python-sklearn-lib, 0.10.0-build1
policy for joblib: *** 0.5.4-1 0
500 http://cn.archive.ubuntu.com/ubuntu/ precise/universe i386 Packages
100 /var/lib/dpkg/status
policy for sklearn: *** 0.10.0-1build1 0
500 http://cn.archive.ubuntu.com/ubuntu/ precise/universe i386 Packages
100 /var/lib/dpkg/status

@GaelVaroquaux
Copy link
Member

python-joblib, 0.5.4-1
python-sklearn, 0.10.0-1build1
python-sklearn-lib, 0.10.0-build1
policy for joblib: *** 0.5.4-1 0
500 http://cn.archive.ubuntu.com/ubuntu/ precise/universe i386 Packages
100 /var/lib/dpkg/status
policy for sklearn: *** 0.10.0-1build1 0
500 http://cn.archive.ubuntu.com/ubuntu/ precise/universe i386 Packages
100 /var/lib/dpkg/status

Well that's bad news. It seems that the Debian packagers screwed up and
upgraded sklearn without upgrading joblib: sklearn 0.10 should have at
least joblib 0.5.6.

I guess that the easiest option is to use both sklearn and joblib from
neurodebian: both are more recent and should work.

@amueller
Copy link
Member

amueller commented Apr 1, 2013

So, I guess we should tell someone at debian about this?

@xianping
Copy link
Author

xianping commented Apr 2, 2013

@GaelVaroquaux , what should I do to deal with the issue now?
@amueller , please tell me if you have told debian guys to solve this.

Thanks both.

@GaelVaroquaux
Copy link
Member

So, I guess we should tell someone at debian about this?

Technically at Ubuntu, I believe. Cc @yarikoptic

@GaelVaroquaux
Copy link
Member

@GaelVaroquaux , what should I do to deal with the issue now?

As I said, I would try installing packages from neurodebian.

@xianping
Copy link
Author

xianping commented Apr 9, 2013

@GaelVaroquaux , any update?

@amueller
Copy link
Member

@xianping why don't you use the neurodebian source?

@xianping
Copy link
Author

@amueller Sorry, I don't know what is the difference between ubuntu and neurodebian. But I have already has ubuntu os installed and other systems are running on that. May I need to update some packages to solve this ? @GaelVaroquaux

@amueller
Copy link
Member

Just add the neuro debian repository to your apt source list and update scikit-learn and joblib, I think.
(and remove the repositories again afterwards).

@larsmans
Copy link
Member

larsmans commented Dec 5, 2013

Seems to be fixed upstream in the meanwhile, closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants