尝试导入时出现以下错误simpletransformers
:
Traceback (most recent call last):
File "...py", line 106, in <module>
from simpletransformers.classification import ClassificationModel, ClassificationArgs
File "/home/work/anaconda/lib/python3.6/site-packages/simpletransformers/classification/__init__.py", line 1, in <module>
from simpletransformers.classification.classification_model import ClassificationModel
File "/home/work/anaconda/lib/python3.6/site-packages/simpletransformers/classification/classification_model.py", line 32, in <module>
from tensorboardX import SummaryWriter
File "/home/work/anaconda/lib/python3.6/site-packages/tensorboardX/__init__.py", line 4, in <module>
from .record_writer import RecordWriter
File "/home/work/anaconda/lib/python3.6/site-packages/tensorboardX/record_writer.py", line 18, in <module>
from google.cloud import storage
File "/home/work/anaconda/lib/python3.6/site-packages/google/cloud/storage/__init__.py", line 38, in <module>
from google.cloud.storage.batch import Batch
File "/home/work/anaconda/lib/python3.6/site-packages/google/cloud/storage/batch.py", line 29, in <module>
from google.cloud import _helpers
File "/home/work/anaconda/lib/python3.6/site-packages/google/cloud/_helpers.py", line 33, in <module>
from google.protobuf import duration_pb2
File "/home/work/anaconda/lib/python3.6/site-packages/google/protobuf/duration_pb2.py", line 21, in <module>
create_key=_descriptor._internal_create_key,
AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key'
我已经尝试升级protobuf
并拥有与protoc
此问题相同的版本:
如何解决“AttributeError:模块'google.protobuf.descriptor'没有属性'_internal_create_key”?
我也尝试升级其他软件包。还有什么问题?
我在云 linux 机器上遇到问题。在我的本地 Windows 机器上,没有问题。