【发布时间】:2019-01-25 12:51:43
【问题描述】:
我有 Windows 10。我已完成安装 Tensorflow。有用。它说“你好 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!
Process returned 0 (0x0) execution time : 2.327 s Press any key to continue
当我在 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 `--user` option or check the permissions.
请帮帮我。不是计算机科学家或工程师。但我写代码是为了好玩。
【问题讨论】:
-
将
--user添加到pip3安装命令中。 -
我不明白为什么我们现在必须使用
--user?因为这应该安装到用户目录中,这可能不是您想要的。Install to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on Windows. (See the Python documentation for site.USER_BASE for full details.) -
我真的不想安装到用户目录并以管理员身份运行 CMD 给我同样的错误。
-
在 pip3(或 pip)安装命令上使用 --user 或 -U 检查。一些图书馆不能识别其中之一,因此需要同时检查两者。一个会工作的。
-
pip install --upgrade tensorflow --user 为我工作
标签: tensorflow