Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I run the command sudo pip3 install -U scikit-learn

I receive a strange error.

Cleaning up...
Command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/scikit-learn/';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-hrwadcyq-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/scikit-learn
Storing debug log for failure in /home/donbeo/.pip/pip.log

here the link with the log file.

I have not any idea of how to solve the problem.

share|improve this question
up vote 5 down vote accepted

There's an issue with the pre-compiled Cython C files (compatibility with Python 3.4.0) with the pypi version.

To properly install scikit-learn, use the git repo instead (tested ok on 14.04):

sudo pip3 install git+
share|improve this answer
numpy and scipy are already installed. I am able to use sklearn on python2 so I think that also the C/C++ compiler is installed – Donbeo Apr 18 '14 at 8:43
Are you running 12.04 or 13.10? (or 14.04) – Sylvain Pineau Apr 18 '14 at 8:50
I am using a fresh installation of 14.04 – Donbeo Apr 18 '14 at 8:52
ok, gimme 10m to boot my VM and check what could be missing – Sylvain Pineau Apr 18 '14 at 8:54
I've updated my anwser, the pypî version is not compatible with python3.4, use the git version instead. – Sylvain Pineau Apr 18 '14 at 9:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.