Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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/setup.py';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. https://drive.google.com/file/d/0B3FIuCA5bZUaUC1pd21MTUFxWkU/edit?usp=sharing

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

share|improve this question

1 Answer 1

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+https://github.com/scikit-learn/scikit-learn.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 at 8:43
    
Are you running 12.04 or 13.10? (or 14.04) –  Sylvain Pineau Apr 18 at 8:50
    
I am using a fresh installation of 14.04 –  Donbeo Apr 18 at 8:52
    
ok, gimme 10m to boot my VM and check what could be missing –  Sylvain Pineau Apr 18 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 at 9:30

Your Answer

 
discard

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.