安装了tensorflow,但是pycharm忽略了它

经济

我安装了tensorflow by(约书亚的答案):如何在anaconda python 3.6上安装tensorflow如果在cmd中对其进行测试:

D:\>python
Python 3.6.1 |Anaconda 4.4.0 (64-bit)| (default, May 11 2017, 13:25:24) [MSC 
v.1
900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.  
>>> import tensorflow
>>> hello = tf.constant('Hello, TensorFlow!')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
    NameError: name 'tf' is not defined
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
2017-07-14 16:21:53.235367: W d:\build\tensorflow\tensorflow-
r1.2\tensorflow\cor
e\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled 
to us
e SSE instructions, but these are available on your machine and could speed 
up C
PU computations.
2017-07-14 16:21:53.508199: W d:\build\tensorflow\tensorflow-
r1.2\tensorflow\cor
e\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled 
to us
e SSE2 instructions, but these are available on your machine and could speed 
up
CPU computations.
2017-07-14 16:21:53.511766: W d:\build\tensorflow\tensorflow-
r1.2\tensorflow\cor
e\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled 
to us
e SSE3 instructions, but these are available on your machine and could speed 
up
CPU computations.
2017-07-14 16:21:53.515734: W d:\build\tensorflow\tensorflow-
r1.2\tensorflow\cor
e\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled 
to us
e SSE4.1 instructions, but these are available on your machine and could 
speed u
p CPU computations.
2017-07-14 16:21:53.517818: W d:\build\tensorflow\tensorflow-
r1.2\tensorflow\cor
e\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled 
to us
e SSE4.2 instructions, but these are available on your machine and could 
speed u
p CPU computations.
>>> print(sess.run(hello))
b'Hello, TensorFlow!'

所以这应该没问题....但是如果我尝试在pycharm中重复此测试(即使在重新启动pycharm之后):ModuleNotFoundError:没有名为“ tensorflow”的模块

有什么想法吗?

迭戈·阿瓜多

您应该conda's在pycharm上使用虚拟环境

转到“文件”,“默认设置”,然后在项目解释器下选择anaconda。

如果pip用于安装软件包,请确保pip指向正确的python实例。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

NoModuleName'通道',但是我已经安装了它。Django的

我安装了 python 3.5.2(64 位),pip 版本是 9.0.1,但是当我尝试安装 tensorflow 时,它说它找不到版本,这是为什么:(

安装了cairosvg,但是ImportError

Yum说需要依赖项“ libltdl.so.3”,但是它已经安装了吗?

Pip说它成功安装了mysqlclient,但是找不到或卸载它

我已经安装了角度cli,但是在cmd中无法识别它的显示

“需要插件”,但是我已经从软件中心安装了它

已经安装了Cmake,但是当其他程序需要使用它时,它仍然表示未安装

通过brew安装了mysql,但是终端找不到它。在macOS上为其别名的正确方法是什么?

我用CPAN成功安装了一个模块,但是perl找不到它。为什么?

无法将Beautiful Soup安装到Python 2,因为我已经在Python 3中安装了它,但是我也无法导入或卸载它

pycharm告诉我我安装了一个软件包,但是我不能使用该pakege

pynput与pip一起安装,但是在PyCharm中的`import pynput`找不到它

在RHEL 6上,我似乎已经安装了EPEL,但是它没有出现在yum中。我该如何激活它?

Pycharm无法安装TensorFlow

我已经安装了 tensorflow 和 tflearn 以在导入期间创建聊天机器人它显示错误

设置变量,但是php只是忽略它并覆盖它?

安装了较旧 GPU 版本的 Tensorflow

PyCharm IDE:已经安装了boto,但是得到了一个“没有名为boto.cloudfront的模块” importError

安装了python-dev并安装了Python.h,但是包含错误

我安装了一个ISO,但是它具有000权限,因此只能以root用户身份访问它。如何使普通用户可以访问它?

Ansible需要python-apt,但是已经安装了

安装了sympy,但是未找到sympy.mpmath

使用pip安装了硒,但是Python抛出错误

我安装了 Perl5.28 并安装了 Net::LibIDN 但 amavisd 找不到它

无法在pycharm上安装tensorflow?

在Pycharm(Mac)上安装Tensorflow

无法在PyCharm中安装tensorflow

它安装了一个模块,表明不是