0

I am new to tensorflow. I have installed tensorflow by the following steps:

$ conda create -n tensorflow pip python=3.6 $ source activate tensorflow (tensorflow) $ pip install --ignore-installed --upgrade \ https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.8.0-cp36-cp36m-linux_x86_64.whl(C.P.U. only)

but when I tried to run the following program:

import tensorflow as tf
hello=tf.constant("Hello,TensorFlow!")
sess=tf.Session()
print=(sess.run(hello))

I got this error in spyder:

ModuleNotFoundError: No module named 'tensorflow'

whereas, python terminal I got this error:

2018-05-16 13:54:34.054511: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA.

Can anybody please tell me what could be the possible reason?

Patrik
  • 2,695
  • 1
  • 21
  • 36
user127
  • 3
  • 2
  • Warning were discussed before https://stackoverflow.com/questions/41293077/how-to-compile-tensorflow-with-sse4-2-and-avx-instructions – Alex Nikiforov May 17 '18 at 07:44

1 Answers1

0

In the python terminal is normal warning. It tells you, that your tensorflow installation is compiled not from source with additional optimization. But most of users haven't this optimization.

And the error in spyder: You have to set up your program to use your "tensorflow" enviroment. It was well explained here: How to run Spyder in virtual environment?.

grzegorz700
  • 171
  • 1
  • 5