ModuleNotFoundError:没有名为'tensorflow.python'Anaconda的模块 [英] ModuleNotFoundError: No module named 'tensorflow.python' Anaconda

查看:1273
本文介绍了ModuleNotFoundError:没有名为'tensorflow.python'Anaconda的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Anaconda上使用Tensorflow已有一段时间了,但是最近我在尝试导入Tensorflow时遇到了提到的错误.

I have been using Tensorflow on Anaconda for a while now, but recently I have been getting the mentioned error when trying to import Tensorflow.

这里已经多次询问了这个问题,所以我尝试了建议的解决方案,但到目前为止没有任何效果(重新安装tensorflow(普通版和gpu版),重新安装Anaconda).运行help('modules')时,tensorflow出现在模块列表中.但是即使在我运行pip uninstall tensorflowpip uninstall tensorflow-gpu之后,在运行help('modules')时,tensorflow仍然保留在模块列表中.

This has been asked here multiple times, so I tried suggested solutions but nothing worked so far (reinstalling tensorflow (both normal and gpu versions), reinstalling Anaconda). When running help('modules') tensorflow appears in module list. But even after I run pip uninstall tensorflow and pip uninstall tensorflow-gpu tensorflow still remains in module list when running help('modules').

该如何解决?

推荐答案

显然原因是Python版本(根据文档Tensorflow支持Python 3.7,这很奇怪).我降级到3.6并能够再次导入Tensorflow

Apparently the reason was the Python version (which is strange as according to documentation Tensorflow supports Python 3.7). I downgraded to 3.6 and I am able to import Tensorflow again

这篇关于ModuleNotFoundError:没有名为'tensorflow.python'Anaconda的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆