Pycharm anaconda import tensor flow library issue
<p>The following program works well under anaconda from command line interface (I am using Mac OS), but it has errors about cannot import/find tensorflow module from PyCharm (using Python 2.7). I already set Python interpreter to be anaconda in PyCharm, still got this error. If anyone have any ideas, it will be great.</p>

<p>Here is the simple program I am using and also the screen snapshot of PyCharm.</p>

<pre><code>import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
a = tf.constant(10)
b = tf.constant(32)
print(sess.run(a + b))
</code></pre>

<p><a href="https://i.stack.imgur.com/d4vZd.png" rel="noreferrer"><img src="https://i.stack.imgur.com/d4vZd.png" alt="enter image description here"></a>
<a href="https://i.stack.imgur.com/nIhRx.png" rel="noreferrer"><img src="https://i.stack.imgur.com/nIhRx.png" alt="enter image description here"></a></p>

<p><strong>Update 1</strong>, how I setup Python interpreter in PyCharm,</p>

<p><a href="https://i.stack.imgur.com/YrWEV.png" rel="noreferrer"><img src="https://i.stack.imgur.com/YrWEV.png" alt="enter image description here"></a></p>

<p><strong>Update 2</strong>, post output for <code>python -c 'import sys; print(sys.path)'</code></p>

<p>['', '/Users/admin/miniconda2/lib/python2.7/site-packages/six-1.10.0-py2.7.egg', '/Users/admin/miniconda2/lib/python27.zip', '/Users/admin/miniconda2/lib/python2.7', '/Users/admin/miniconda2/lib/python2.7/plat-darwin', '/Users/admin/miniconda2/lib/python2.7/plat-mac', '/Users/admin/miniconda2/lib/python2.7/plat-mac/lib-scriptpackages', '/Users/admin/miniconda2/lib/python2.7/lib-tk', '/Users/admin/miniconda2/lib/python2.7/lib-old', '/Users/admin/miniconda2/lib/python2.7/lib-dynload', '/Users/admin/miniconda2/lib/python2.7/site-packages']</p>

<p><strong>Update 3</strong>,</p>

<p>Post File menu and PyCharm version,<a href="https://i.stack.imgur.com/4EaV9.png" rel="noreferrer"><img src="https://i.stack.imgur.com/4EaV9.png" alt="enter image description here"></a></p>

<p><a href="https://i.stack.imgur.com/ekDYn.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ekDYn.png" alt="enter image description here"></a></p>

<p><strong>Update 4</strong>, Preferences => Project Interpreter setting,</p>

<p><a href="https://i.stack.imgur.com/LgUDd.png" rel="noreferrer"><img src="https://i.stack.imgur.com/LgUDd.png" alt="enter image description here"></a></p>

<p><strong>Update 5</strong>, package list screen snapshot,</p>

<p><a href="https://i.stack.imgur.com/jt8jE.png" rel="noreferrer"><img src="https://i.stack.imgur.com/jt8jE.png" alt="enter image description here"></a></p>

<p><strong>Update 6</strong>, using miniconda other than conda seems no issues, post screen snapshots,</p>

<p><a href="https://i.stack.imgur.com/b27im.png" rel="noreferrer"><img src="https://i.stack.imgur.com/b27im.png" alt="enter image description here"></a></p>

<p><a href="https://i.stack.imgur.com/IN68p.png" rel="noreferrer"><img src="https://i.stack.imgur.com/IN68p.png" alt="enter image description here"></a></p>