pip install - PermissionError: [Errno 13] Permission denied

不羁的心 提交于 2019-12-10 23:01:06

问题


Environment

  • Windows 8.1
  • Python 3.5
  • Anaconda

Issue

When I do pip install sklearn --upgrade, I got the following error:

Exception:
Traceback (most recent call last):
  File "d:\anaconda3\lib\site-packages\pip\basecommand.py", line 209, in main
    status = self.run(options, args)
  File "d:\anaconda3\lib\site-packages\pip\commands\install.py", line 317, in run
    prefix=options.prefix_path,
  File "d:\anaconda3\lib\site-packages\pip\req\req_set.py", line 732, in install
    **kwargs
  File "d:\anaconda3\lib\site-packages\pip\req\req_install.py", line 835, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "d:\anaconda3\lib\site-packages\pip\req\req_install.py", line 1030, in move_wheel_files
    isolated=self.isolated,
  File "d:\anaconda3\lib\site-packages\pip\wheel.py", line 344, in move_wheel_files
    clobber(source, lib_dir, True)
  File "d:\anaconda3\lib\site-packages\pip\wheel.py", line 322, in clobber
    shutil.copyfile(srcfile, destfile)
  File "d:\anaconda3\lib\shutil.py", line 115, in copyfile
    with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: 'd:\\anaconda3\\Lib\\site-packages\\sklearn\\utils\\m
urmurhash.cp35-win_amd64.pyd'

The command prompt is run as an Administrator, so I have the permission.

What should I do? Any suggestion would be appreciated.


回答1:


Have you installed its dependencies like numpy and scipy? Check it out and then we will proceed further.

Final Solution: try conda like conda install scikit-learn=_version_




回答2:


Here is what I did to solve this exact problem on my Windows 10 pc with Anaconda Python 3.6 installed:

  • open an Anaconda prompt window as administrator
  • pip uninstall kivy
  • pip install kivy
  • pip install docutils pygments pypiwin32 kivy.deps.sdl2


来源:https://stackoverflow.com/questions/36809739/pip-install-permissionerror-errno-13-permission-denied

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!