由于EnvironmentError导致无法安装软件包:[WinError 5]访问被拒绝:

问题描述 投票:8回答:4

我有Windows 10.我已经完成了Tensorflow的安装。有用。它说“Hello Tensorflow!”。但它之前有这一切:

2018-08-18 18:16:01.500579: I T:\src\github\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 2018-08-18 18:16:01.769002: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:1405] Found device 0 with properties: name: GeForce GTX 950 major: 5 minor: 2 memoryClockRate(GHz): 1.3545 pciBusID: 0000:01:00.0 totalMemory: 2.00GiB freeMemory: 1.64GiB 2018-08-18 18:16:01.774030: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:1484] Adding visible gpu devices: 0 2018-08-18 18:16:02.095489: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:965] Device interconnect StreamExecutor with strength 1 edge matrix: 2018-08-18 18:16:02.099093: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:971] 0 2018-08-18 18:16:02.100631: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:984] 0: N 2018-08-18 18:16:02.102156: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:1097] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1401 MB memory) -> physical GPU (device: 0, name: GeForce GTX 950, pci bus id: 0000:01:00.0, compute capability: 5.2) Hello Tensorflow!

进程返回0(0x0)执行时间:2.327秒按任意键继续

当我在cmb中输入pip3 install --upgrade tensorflow-gpu时,无论是行政还是普通,我都会得到这个Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\users\\dylan\\appdata\\local\\programs\\python\\python35\\Lib\\site-packages\\numpy\\.libs\\libopenblas.BNVRK7633HSX7YVO2TADGR4A5KEKXJAW.gfortran-win_amd64.dll' Consider using the - useroption or check the permissions.请帮帮我。不是计算机科学家或工程师。但我编码很有趣。

tensorflow
4个回答
11
投票

如果您不想更改权限,只需键入要使用用户权限执行的命令。例如: - > pip3 install --upgrade tensorflow-gpu --user


6
投票

使用'--user'运行相同的命令


1
投票

我发现如果我以管理员身份运行CMD并运行命令,我可以毫无问题地安装它。试试吧,给我一些反馈。


1
投票

在搜索中键入CMD,当BEST MATCH搜索结果中出现命令提示时,右键单击它并在出现用户控制窗口时选择“以管理员身份运行”,选择“是”。将出现命令提示符窗口,您应该看到“C:/ WINDOWS / system32>”

在这一点上只需键入你想要的,应该工作!

© www.soinside.com 2019 - 2024. All rights reserved.