I can ran tensorflow in anaconda command line successfully, but when I ran it in pycharm, it complains for not finding tensorflow, but I do find it in the package of this python interpreter. Is there anything else I need to do ? Thanks
1 Answer
Looking at the console, your .py file is also called tensorflow, so when you do import tensorflow as tf, you end up trying to import things from the same file.
Rename your own file to something else, such as tensorflow_test_1.py or whatnot. :)
1 Comment
Tobias Kienzler
...or use
from __future__ import absolute_imports if there is a sensible reason to use the same name

tensorflow, but it complains about it not having aconstantattribute. For better searchability you should copy-paste the error message in the post instead of only showing a screenshot.