Не работает сабжевая связка, хотя в терминале, если переключиться все работает:
user@devbox:~/work/tensorflow % workon
tensorflow
user@devbox:~/work/tensorflow % workon tensorflow
(tensorflow) user@devbox:~/work/tensorflow % python hello.py
2017-09-23 01:12:46.821944: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-09-23 01:12:46.821989: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-09-23 01:12:46.822004: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-09-23 01:12:46.822032: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
b'Hello, TensorFlow!'
Тестовый код:
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
В емаксике же следующая ситуация (elpy поставлен из MELPA)
M-x elpy-config
Elpy Configuration
Virtualenv........: tensorflow (/Users/user/.virtualenvs/tensorflow)
RPC Python........: 3.6.2 (/usr/local/bin/python3)
Interactive Python: /usr/local/bin/python3 (/usr/local/bin/python3)
Emacs.............: 25.3.1
Elpy..............: 1.16.1
Jedi..............: 0.11.0
Rope..............: 0.10.7
Importmagic.......: 0.1.7
Autopep8..........: 1.3.2
Yapf..............: 0.18.0
Syntax checker....: flake8 (/usr/local/bin/flake8)
При выполнении коде в буфере:
Python 3.6.2 (default, Jul 17 2017, 16:44:45)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> python.el: native completion setup loaded
>>> Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/user/work/tensorflow/hello.py", line 1, in <module>
import tensorflow as tf
ModuleNotFoundError: No module named 'tensorflow'
В чем может быть проблема?