我一直在努力使张量流正常工作。不确定是什么问题。我相信我已经安装了最新版本的pip,python,tensorflow和protobuf(这似乎会对其他人造成类似的问题)。
要获取错误消息,我要做的事情:
$ cd targetdirectory
$ source myenv/bin/activate
(myenv)$ python3
>>> import tensorflow
这是我的错误消息:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/dannyguy/targetDirectory/myenv/lib/python3.7/site-packages/tensorflow/__init__.py", line 22, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/Users/dannyguy/targetDirectory/myenv/lib/python3.7/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/Users/dannyguy/targetDirectory/myenv/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/Users/dannyguy/targetDirectory/myenv/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 114
def TFE_ContextOptionsSetAsync(arg1, async):
^
SyntaxError: invalid syntax
我之前收到此错误消息。不太确定为什么现在会有另外一个。
ModuleNotFoundError: No module named 'tensorflow'
任何帮助将不胜感激!