Я пишу следующий код в ноутбуке Jupyter.AttributeError: module 'tensorflow' не имеет атрибута 'Graph'
import tensorflow as tf
g = tf.Graph()
И при выполнении этого простого кода возникает следующая ошибка.
AttributeError: module 'tensorflow' has no attribute 'Graph'
Если я выполняю то же самое с консоли. Оно работает. Любая идея, что здесь происходит.
Дополнительная информация: (тест мой virtualenv)
IPython, jupyter, версия питона:
(test) [email protected]:~/tensorflow$ which ipython3
/home/xingzhou/tensorflow/test/bin/ipython3
(test) [email protected]:~/tensorflow$ which jupyter
/home/xingzhou/tensorflow/test/bin/jupyter
(test) [email protected]:~/tensorflow$ which python3
/home/xingzhou/tensorflow/test/bin/python3
Выполнить из консоли:
(test) [email protected]:~/tensorflow$ python3
Python 3.5.2 (default, Nov 17 2016, 17:05:23)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> g = tf.Graph()
>>> type(g)
<class 'tensorflow.python.framework.ops.Graph'>
>>>