1

Hi I'm trying to install scikit-learn in Python on a mac, but failed. Does anyone having idea how to fix this? Thanks! The error message is as follows.

Error message

Command /usr/bin/python -c "import setuptools, tokenize;file='/private/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-UfI2WG-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/tmp/pip_build_root/scikit-learn

Storing debug log for failure in /Users/yuxinsun/Library/Logs/pip.log

pip.log is like this. (sorry i have to change a little for links in pip.log since i can't attach more than 2 links, but i think the links are not so crucial)

/usr/local/bin/pip run on Sun Mar 23 02:25:36 2014

Downloading/unpacking scikit-learn

Getting page https://pypi.python.org/simple/scikit-learn/

URLs to search for versions for scikit-learn:

  • link - pypi.python.org/simple/scikit-learn/

    Analyzing links from page link - pypi.python.org/simple/scikit-learn/

    Skipping link link - pypi.python.org/packages/2.6/s/scikit-learn/scikit-learn-0.10.win32-py2.6.exe#md5=eae1e20fc4d7ebc3ec2d1c31cb5eb1a5 (from link - pypi.python.org/simple/scikit-learn/); unknown archive format: .exe

    Skipping link link - pypi.python.org/packages/2.6/s/scikit-learn/scikit-learn-0.11.win32-py2.6.exe#md5=d585305053461699b48ffbb176a16ca8 (from link - pypi.python.org/simple/scikit-learn/); unknown archive format: .exe

    Skipping link link - pypi.python.org/packages/2.6/s/scikit-learn/scikit-learn-0.12.1.win32-py2.6.exe#md5=0a352a8087c581d4c75cc2ad4ec043b2 (from link - pypi.python.org/simple/scikit-learn/); unknown archive format: .exe

    Skipping link link - pypi.python.org/packages/2.6/s/scikit-learn/scikit-learn-0.12.win32-py2.6.exe#md5=3fdb37b8754167fb2ddde035306cf4ae (from link - pypi.python.org/simple/scikit-learn/); unknown archive format: .exe

    Skipping link link - pypi.python.org/packages/2.6/s/scikit-learn/scikit-learn-0.13.1.win32-py2.6.exe#md5=6fcfd76f705f30c4fabaece0832026fc (from link - pypi.python.org/simple/scikit-learn/); unknown archive format: .exe

@
"~/Library/Logs/pip.log" 1413L, 93793C

V-SHY
  • 3,925
  • 4
  • 31
  • 47
user3451228
  • 153
  • 2
  • 9

4 Answers4

1

I ran into this same error with pip install -U scikit-learn on Ubuntu 14.04. I believe it's an insufficient permissions issue on the file /private/tmp/pip_build_root/scikit-learn/setup.py. I resolved it by elevating permissions on pip with sudo pip install -U scikit-learn

bunni
  • 41
  • 2
1

I upgrade pip from 7.1.2 to 8.1 and it fixed the issue

Steve
  • 4,388
  • 3
  • 17
  • 25
0

I have installed scikit-learn by the following method.

    $ pip install git+https://github.com/scikit-learn/scikit-learn.git
0

It is best practise to set up an environment to do this. Anaconda (or Miniconda) handles the requirements/dependencies pretty well.

user2827262
  • 157
  • 8