-1

I am on Ubuntu 16.04 freshly installed, and I have installed pip but when I try to install scikit I get the following error message:

File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/sklearn'
darthbith
  • 18,484
  • 9
  • 60
  • 76
  • 2
    Please always google the error message first: http://stackoverflow.com/questions/31512422/pip-install-r-oserror-errno-13-permission-denied – cel Oct 01 '16 at 05:27

1 Answers1

1

$ pip install --user sklearn.

Or use a virtualenv. Do not use sudo pip which the other question recommends.

ev-br
  • 24,968
  • 9
  • 65
  • 78
  • The posted question is very valid. Installing sklearn with pip fails inside a virtualenv! – Christophe Oct 19 '16 at 16:01
  • No, same error... sklearn tries to install things under the system dir eventhough pip is running inside virtualenv... not sure who the culprit is, maybe my virtualenv install is corrupted... I managed to make it work by editing pip code and forcing platlib=purelib – Christophe Oct 19 '16 at 16:50