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

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


当前回答

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

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

其他回答

安装tensorflow使用命令包括——User。

pip install --ignore-installed --upgrade --user tensorflow==2.0.1

这里是tensorflow的2.0.1版本。

这在我的案例中是有效的:

PIP安装——用户——升级PIP

否则,以管理员身份运行打开命令提示符并执行相同的操作。

如果您使用的是windows 10 20H2,请在pip3(或pip) install命令上同时使用——user或-U检查。有些库不能识别其中的一个,因此需要同时检查两个库。一个就可以了。

pip3 install --user tensorflow-gpu

or

pip3 install -U gast==0.3.3

以管理员身份在Powershell中运行带——user参数的pip install命令可以解决此问题。

Python -m PIP install——upgrade PIP——user

尝试一下,如果没有工作的情况下,权限错误,这将解决它。

sudo chown user -R env

作为我案例的一个例子

sudo chown ubuntu -R venv