Last active
August 1, 2018 22:51
-
-
Save daj/6d920efcea19fda927e4b69b75643399 to your computer and use it in GitHub Desktop.
Check Python can import TensorFlow dependencies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script assumes you are running from Terminal / command line | |
python | |
import tensorflow as tf | |
hello = tf.constant('Hello from TensorFlow. Everything seems to be working!') | |
sess = tf.Session() | |
print(sess.run(hello)) | |
exit() |
the script in your first post worked fine without any errors.
but i am facing this when I run my code :
anaconda3/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py in ()
3 from future import print_function
4
----> 5 import tensorflow as tf
6 from tensorflow.python.framework import ops as tf_ops
7 from tensorflow.python.training import moving_averages
anaconda3/lib/python3.6/site-packages/tensorflow/init.py in ()
598 # resolution to succeed.
599 # pylint: disable=undefined-variable
--> 600 del python
601 del core
602 # pylint: enable=undefined-variable
NameError: name 'python' is not defined
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's an example what you'll see if your TensorFlow dependencies are not setup correctly: