简体   繁体   English

导入tensorflow-gpu版本时出错

[英]error during the import of tensorflow-gpu version

import tensorflow Traceback (most recent call last): File "", line 1, in import tensorflow File "C:\\Users\\nayer meleka\\AppData\\Local\\Programs\\Python\\Python36\\lib\\site-packages\\tensorflow__init__.py", line 39, in from tensorflow._api.v1 import app ModuleNotFoundError: No module named 'tensorflow._api' 导入tensorflow跟踪(最近一次调用):导入tensorflow文件中的文件“”,第1行,“ C:\\ Users \\ nayer meleka \\ AppData \\ Local \\ Programs \\ Python \\ Python36 \\ lib \\ site-packages \\ tensorflow__init __。py” tensorflow._api.v1导入应用程序的第39行,导入应用程序ModuleNotFoundError:没有名为'tensorflow._api'的模块

this error happend when I tried to import it from terminal 当我尝试从终端导入该错误时发生

When I tried to use tensorflow this error pop up. 当我尝试使用tensorflow时会弹出此错误。

I installed it using pip didn't use any virtualmachine. 我使用pip安装了它,没有使用任何虚拟机。

Try installing tensorflow-gpu again by running the command prompt in administrator mode still through pip. 尝试通过仍然以pip在管理员模式下运行命令提示符来再次安装tensorflow-gpu。 And keep in mind that it won't just start using the GPU by itself, you will have to install other dependencies too such as Visual Studio, CUDA, CUDNN , etc. 而且请记住,它不仅会开始单独使用GPU,还必须安装其他依赖项,例如Visual Studio,CUDA,CUDNN等。

Read this: https://www.quantinsti.com/blog/install-tensorflow-gpu 阅读此内容: https : //www.quantinsti.com/blog/install-tensorflow-gpu

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM