Suba
Suba

Reputation: 11

Error in installing scikit-learn in ubuntu

When is try to install scikit learn, im getting this error, I used "pip install -U scikit-learn[alldeps]"

"""Collecting scikit-learn[alldeps]
  Using cached scikit_learn-0.18.1-cp27-cp27mu-manylinux1_x86_64.whl
Requirement already up-to-date: numpy>=1.6.1; extra == "alldeps" in /usr/local/lib/python2.7/dist-packages (from scikit-learn[alldeps])
Collecting scipy>=0.9; extra == "alldeps" (from scikit-learn[alldeps])
  Using cached scipy-0.19.0-cp27-cp27mu-manylinux1_x86_64.whl
Installing collected packages: scipy, scikit-learn
  Found existing installation: scipy 0.17.0
    DEPRECATION: Uninstalling a distutils installed project (scipy) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling scipy-0.17.0:
Exception:
Traceback (most recent call last):
  File "/home/suba/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/suba/.local/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/home/suba/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 778, in install
    requirement.uninstall(auto_confirm=True)
  File "/home/suba/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/home/suba/.local/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/home/suba/.local/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/usr/lib/python2.7/shutil.py", line 303, in move
    os.unlink(src)
OSError: [Errno 13] Permission denied: '/usr/lib/python2.7/dist-packages/scipy-0.17.0.egg-info' """

How can i fix this error?

Upvotes: 0

Views: 1338

Answers (2)

Jiahao Cai
Jiahao Cai

Reputation: 1250

Permission error. sudo pip install -U scikit-learn[alldeps] could help.

Upvotes: 1

vsr
vsr

Reputation: 1127

There's a permission error. Are you using root permissions to install? If not, please use same command prefixed with 'sudo' and provide password when asked.

Upvotes: 0

Related Questions