简体   繁体   English

在 anaconda 环境中安装了 tensorflow 但无法导入(Tensorflow 1.15、Python 3.6、PyCharm)

[英]Installed tensorflow in an anaconda env but cannot import (Tensorflow 1.15, Python 3.6, PyCharm)

I recently created an environment in PyCharm using anaconda and i'm using Python version 3.6.我最近使用 anaconda 在 PyCharm 中创建了一个环境,我使用的是 Python 版本 3.6。 I want to import tensorflow but unfortunately i keep getting the error message "ModuleNotFoundError: No module named 'tensorflow'".我想导入 tensorflow 但不幸的是我不断收到错误消息“ModuleNotFoundError: No module named 'tensorflow'”。 I installed tensorflow versions (1.20 & 1.15) on my environment with no major issues, i also tried and added both in the Project Interpreter window successfully but when i run my program i keep getting that error.我在我的环境中安装了 tensorflow 版本(1.20 和 1.15),没有出现重大问题,我还尝试并在 Project Interpreter window 中成功添加了这两个版本,但是当我运行我的程序时,我一直收到该错误。 Anyone know a good way to fix this?有人知道解决这个问题的好方法吗?

If you get this error, you have installed everything in one environment but you work in another.如果您收到此错误,则表示您已在一个环境中安装了所有内容,但您在另一个环境中工作。 Try installing tensorflow from another command line (in another shell).尝试从另一个命令行(在另一个 shell 中)安装 tensorflow。

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

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