gpt4 book ai didi

python - TensorFlow错误: funcsigs module doesn't have signature attribute

转载 作者:行者123 更新时间:2023-11-30 09:53:11 26 4
gpt4 key购买 nike

我已经安装了 TensorFlow,想要检查安装情况。这是与python控制台的交互。

Python 2.7.5 (default, Nov 20 2015, 02:00:19) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/shehab1/.local/lib/python2.7/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/home/shehab1/.local/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 106, in <module>
from tensorflow.python.platform import test
File "/home/shehab1/.local/lib/python2.7/site-packages/tensorflow/python/platform/test.py", line 81, in <module>
import mock # pylint: disable=g-import-not-at-top,unused-import
File "/home/shehab1/.local/lib/python2.7/site-packages/mock/__init__.py", line 2, in <module>
import mock.mock as _mock
File "/home/shehab1/.local/lib/python2.7/site-packages/mock/mock.py", line 81, in <module>
inspectsignature = funcsigs.signature
AttributeError: 'module' object has no attribute 'signature'
>>>

有人可以告诉我我做错了什么吗?谢谢。

最佳答案

正如 Yaroslav 所指出的,这很可能是由于运行的 Python 版本太旧,或者您没有安装 funcsigs 软件包。对于后者,请尝试 pip install funcsigs

关于python - TensorFlow错误: funcsigs module doesn't have signature attribute,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40937783/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com