1

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

enter image description here

enter image description here

1
  • It does find a tensorflow, but it complains about it not having a constant attribute. For better searchability you should copy-paste the error message in the post instead of only showing a screenshot. Commented Aug 30, 2016 at 6:49

1 Answer 1

7

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. :)

Sign up to request clarification or add additional context in comments.

1 Comment

...or use from __future__ import absolute_imports if there is a sensible reason to use the same name

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.