我有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.

请帮帮我。不是计算机科学家或工程师。但我编程只是为了好玩。


当前回答

如果您不想更改权限,只需输入您想要执行的命令,并具有用户权限:

pip3 install --upgrade tensorflow-gpu --user

其他回答

我在管理模式下打开并开始写作

Python -m PIP install tensorflow==2.3.0

使用带——user参数的pip install命令解决了这个问题

python -m pip install --upgrade pip --user

尝试执行以恢复pip:

python3 -m ensurepip

我也有同样的问题。用这个命令修正了它。

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

对我来说(在windows中),我必须重新启动终端并以管理员身份运行它(如果您使用pycharm终端,只需关闭pycharm,并以管理员身份重新打开它,然后再试一次),这就解决了问题,安装成功。

祝你好运