我试图安装射线,但是它出现了一个错误:
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
我试图解决这个问题,并降低了原型机的等级
Name: protobuf
Version: 3.20.0
Summary: Protocol Buffers
Home-page: https://developers.google.com/protocol-buffers/
Author:
Author-email:
License: BSD-3-Clause
Location: d:\opencv\lib\site-packages
Requires:
Required-by: ray, tensorboard, tensorflow
但是,在Ray、TensorFlow和喀拉斯中,问题依然存在。我的申请不再起作用了。我怎么才能修好它?
发布于 2022-06-03 18:20:04
发布于 2022-06-02 20:43:49
在我的例子中,我的protobuf
文件中没有显式的requirements.txt
,但是我确实有一个相关的依赖项,这显然是有问题的:
googleapis-common-protos==1.6.0 # Depends on protobuf
删除--这允许后续的pip install -e .
(假设setup.py
存在)与google-api-core==1.13.0
所具有的任何依赖项一起使用。这导致了googleapis-common-protos==1.56.2
的安装并解决了错误。
发布于 2022-06-04 18:50:25
或者,我能够升级到wandb==0.12.17
,一切似乎都在正常工作。
旧(不起作用):
- pip:
- wandb==0.10.21
新的(工作):
- pip:
- wandb==0.12.17
https://stackoverflow.com/questions/72441758
复制相似问题