TypeError: Descriptors cannot not be created directly.
python 依赖 protobuf 奇怪报错 TypeError: Descriptors cannot not be created directly.
在使用 paddlex
时引入一些调用了 proto
的三方包时报了如下错误:
import paddle.fluid as fluid
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).
在网上搜索后发现似乎是最新的包编译时出了问题,开发人员已经会在更新后修复。
解决办法
在没有发布新版本之前先降级使用吧:
pip install protobuf==3.19.0
参考链接
https://discuss.streamlit.io/t/typeerror-descriptors-cannot-not-be-created-directly/25639
TypeError: Descriptors cannot not be created directly.相关推荐
- python TypeError: Descriptors cannot not be created directly错误解决
运行python脚本时出现错误 TypeError: Descriptors cannot not be created directly. If this call came from a _pb2 ...
- TypeError: Descriptors cannot not be created directly解决
文章目录 问题 解决 问题 跑代码的时候遇到了这个问题: TypeError: Descriptors cannot not be created directly. If this call cam ...
- TensorFlow2.8.0报错TypeError: Descriptors cannot not be created directly.
@创建于:2022.09.28 @修改于:2022.09.28 1.错误信息 Traceback (most recent call last):File "D:\PycharmProjec ...
- import keras时遇到的错误 TypeError: Descriptors cannot not be created directly. If this call came from a _
问题描述 版本对应 keras 与 tensorflow 版本对应关系:https://master–floydhub-docs.netlify.app/guides/environments/ 本文 ...
- 09 TypeError: Descriptors cannot not be created directly.
1.问题: import yaml ModuleNotFoundError: No module named 'yaml' yaml模块的pip工具包名称不是yaml,而是pyyaml,所以不是直接p ...
- 解决:TypeError: Descriptors cannot not be created directly
我使用pip命令下载安装paddlepaddle库,具体命令如下所示,采用清华镜像源,这样下载速度更快! pip install -i https://pypi.tuna.tsinghua.edu.c ...
- Python报错 TypeError: Descriptors cannot not be created directly
Python报错TypeError: Descriptors cannot not be created directly 具体错误: TypeError: Descriptors cannot no ...
- Python报错TypeError: Descriptors cannot not be created directly
Python报错TypeError: Descriptors cannot not be created directly 具体错误: TypeError: Descriptors cannot no ...
- 问题:TypeError: Descriptors cannot not be created directly.解决方法
运行代码时提示如下报错: 解决上面问题,直接在控制台中输入下面命令重新安装protobuf即可,如下: pip install 'protobuf~=3.19.0' 以上就是解决TypeError: ...
最新文章
- android检查usb广播,Android 检测USB 音频设备
- 添加全局函数$.extend和对象方法$.fn
- 软件项目管理0703:净收确认
- OpenGL Lighting models照明模型的实例
- 本地启动 Hybris 服务器调试模式后,监听在 8000 端口
- antix linux安装教程,antiX 19.1 发布,轻量级的桌面Linux发行版
- C++ 11 中的右值引用
- EBGP邻居抖动问题
- 商业大亨微信草花服务器,商业大亨2每日答题和服务器进度奖励
- Jlink--SWD脚位连接
- 【干货】私域电商崛起:2021见实私域流量白皮书高清6月版.pdf(附下载链接)...
- 300 秒带你吃透大数据!
- Script error.全面解析
- 建筑能源管理系统主要有什么功能?
- BeautifulSoup介绍
- asp.net毕业设计家电维修保养信息系统
- ETL 部署和简单的例子
- wordpress 插件,wordpress 采集插件,实用wordpress 插件合集
- 【工具】LaTeX-OCR一款免费的公式识别软件
- FDR土壤水分检测传感器设计方案