python - pip 安装 - PermissionError : [Errno 13] Permission denied

标签 python windows permissions pip anaconda

环境

  • Windows 8.1
  • python 3.5
  • python

问题

当我执行 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'

命令提示符是以管理员身份运行的,所以我有权限。

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

最佳答案

您是否安装了它的依赖项,例如 numpyscipy?检查一下,然后我们将继续进行。

最终解决方案: 尝试像 conda install scikit-learn=_version_

这样的 conda

关于python - pip 安装 - PermissionError : [Errno 13] Permission denied,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36809739/

相关文章:

c++ - Windows 上的文件处理例程

winapi - 在 Windows Server 2019 上从作为 IIS APPPOOL 帐户运行的进程调用 OpenProcess 的访问被拒绝

c - Linux 可继承能力在程序启动时被清除

python - Matplotlib 和 Numpy - 创建日历热图

python - 如何选择具有最高值(value)的 key

python - 如何在 python 3 中将浮点字符串转换为整数

c++ - 内存中着色器的数量在多大程度上影响性能?

c# - 以编程方式确定 Oracle Home 安装版本?

python - 根据对象的属性访问numpy数组

azure - 有没有办法使用 REST API 获取特定 Azure DevOps 项目中的用户权限?