pip install - PermissionError:[Errno 13]权限被拒绝

时间:2016-04-23 10:44:06

标签: python windows permissions pip anaconda

环境

  • Windows 8.1
  • Python 3.5
  • 阿纳康达

问题

当我pip install sklearn --upgrade时,我收到以下错误:

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'

命令提示符以管理员身份运行,因此我有权限。

我该怎么办?任何建议将不胜感激。

2 个答案:

答案 0 :(得分:5)

您是否安装了 numpy scipy 等依赖项?检查一下,然后我们将继续进行。

最终解决方案:  尝试像conda

一样conda install scikit-learn=_version_

答案 1 :(得分:0)

以下是我在安装了Anaconda Python 3.6的Windows 10 PC上解决这个问题所做的工作:

  • 以管理员身份打开Anaconda提示窗口
  • pip uninstall kivy
  • pip install kivy
  • pip install docutils pygments pypiwin32 kivy.deps.sdl2