zjffdu zjffdu - 3 years ago 273
Python Question

Can not use tensorflow in pycharm

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

AKX AKX
Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download