ubuntun 16.04 AttributeError: type object 'Callable' has no attribute '_abc_registry'
ubuntun 16.04 python 升级到3.7遇到各种坑
其中在openvino 跑模型时遇到以下错误:
root@magicdepth-OptiPlex-7010:/opt/intel/openvino/deployment_tools/model_optimizer# python3 mo.py --input_model INPUT_MODEL
Traceback (most recent call last):File "mo.py", line 28, in <module>from mo.main import mainFile "/opt/intel/openvino_2019.2.275/deployment_tools/model_optimizer/mo/main.py", line 27, in <module>from mo.utils import import_extensionsFile "/opt/intel/openvino_2019.2.275/deployment_tools/model_optimizer/mo/utils/import_extensions.py", line 23, in <module>from mo.back.replacement import BackReplacementPatternFile "/opt/intel/openvino_2019.2.275/deployment_tools/model_optimizer/mo/back/replacement.py", line 17, in <module>from mo.utils import class_registrationFile "/opt/intel/openvino_2019.2.275/deployment_tools/model_optimizer/mo/utils/class_registration.py", line 23, in <module>from mo.graph.graph import GraphFile "/opt/intel/openvino_2019.2.275/deployment_tools/model_optimizer/mo/graph/graph.py", line 24, in <module>from mo.graph.port import PortFile "/opt/intel/openvino_2019.2.275/deployment_tools/model_optimizer/mo/graph/port.py", line 18, in <module>from mo.front.common.partial_infer.utils import int64_arrayFile "/opt/intel/openvino_2019.2.275/deployment_tools/model_optimizer/mo/front/common/partial_infer/utils.py", line 21, in <module>from typing import IterableFile "/opt/ptyhon3.7/lib/python3.7/site-packages/typing.py", line 1357, in <module>class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):File "/opt/ptyhon3.7/lib/python3.7/site-packages/typing.py", line 1005, in __new__self._abc_registry = extra._abc_registry
AttributeError: type object 'Callable' has no attribute '_abc_registry'
查了下相关资料,这是因为python3.7和python 3.6 中的typing,不兼容所导致,
可以看下这个国外上面的帖子(不需要翻墙):
https://github.com/modin-project/modin/issues/540
可以使用
pip3 show typing
查看typing版本,如果是typing 3,6,6版本则尝试将其卸载
pip uninstall typing
但是这次升级openvino R3.1版本同样遇到该问题,typing 版本是3.7.4,同样还是有问题,
继续卸载,typing库,就是和它杠上了
sudo pip3 uninstall typing
卸载完成之后,重新运行 OK.
ubuntun 16.04 将python从系统自带的3.5升级到3.7会遇到各种坑,这只是其中一个
ubuntun 16.04 AttributeError: type object 'Callable' has no attribute '_abc_registry'相关推荐
- 关于AttributeError: type object ‘XXX‘ has no attribute ‘XXX‘的问题
关于AttributeError: type object 'XXXXXX' has no attribute 'name'的报错的原因,先运行运行一段代码 例如: class Person(obje ...
- python 提示错误AttributeError: type object 'str' has no attribute '_name_'
在做<Machine Learning in Action>书中的第三章绘制树形图时遇到了这个问题AttributeError: type object 'str' has no attr ...
- AttributeError: type object ‘Image‘ has no attribute ‘open‘
AttributeError: type object 'Image' has no attribute 'open' 原因分析:Image调用顺序出错,因为第一行的from PIL import I ...
- unittest-ddt报错AttributeError: type object ‘forTestDDT‘ has no attribute ‘test_2‘
unittest 添加多个ddt数据驱动后,报错: FAILED (errors=1)Error Traceback (most recent call last):File "D:\Ana ...
- AttributeError: type object ‘Image‘ has no attribute ‘fromarray‘
错误描述: Traceback (most recent call last):File "D:\OCR\DBNet.pytorch-master\tools\predict.py" ...
- “AttributeError: type object ‘RocCurveDisplay‘ has no attribute ‘from_predictions‘ “.
"AttributeError: type object 'RocCurveDisplay' has no attribute 'from_predictions' ". 目录 & ...
- 解决gensim报错AttributeError: type object ‘Word2Vec‘ has no attribute ‘load_word2vec_format‘
解决方法 将报错的 from gensim.models import Word2Vecmodel = Word2Vec.load_word2vec_format('test.bin.gz', bin ...
- AttributeError:type object ‘TFLiteConverterV2 ‘has no attribute ‘form_keras_model_file ‘
在Tensor Flow2.0以上加载keras模型文件使用load_model keras_model = tf_keras_models.load_model("xx.h5") ...
- python object has no attribute_如何修复python中的“AttributeError:type object has no attribute”?...
您的代码引发此异常: AttributeError: type object 'Meeting' has no attribute 'datetime' 在这一行: meeting_start = M ...
最新文章
- Meta祭出元宇宙「阿拉丁神灯」!LeCun称世界模型将带来像人一样的AI
- HDU1827(强连通分量)
- KVM虚拟化存储管理
- QT的QDeadlineTimer类的使用
- TinkPHP框架学习-01基本知识
- Pandas数据操作
- java中用new创建一个对象的过程解析_【漫画】Java对象的创建和访问全过程详解...
- 基于JAVA+SpringMVC+MYSQL的城市公交查询系统
- 制造与供应链中的人工智能行业调研报告 - 市场现状分析与发展前景预测(2021-2027年)
- 毕设-基于SSM高校后勤管理系统
- Ubuntu上安装NS3(最详细的图文介绍)
- 信息安全-网络安全应急响应技术原理与应用(一)
- ERROR: Cannot uninstall ‘filelock‘. It is a distutils installed project and thus we cannot accuratel
- ear的英语怎么念_不一样的高阶美式英语视频字母表 - A到I
- java html读取数据库数据类型,从Word(Docx)读取方程式和公式到html并使用java保存数据库(示例代码)...
- 【2016-10-14收获】Cloud IDEs
- 数据平台初试(产品篇)——短视频直播监测案例分享
- win7用计算机名共享打印机,win7共享打印机需要输入用户名和密码该怎么办啊?...
- 语法规范:BNF与ABNF 巴斯克范式
- FFT(傅里叶快速变换算法)计算频率
热门文章
- EasyPoi 的样式使用及其自定义
- atcoder 2643 切比雪夫最小生成树
- 牛客网暑期ACM多校训练营(第十场)D Rikka with Prefix Sum (组合数学)
- F - 你这是第一次让我看到落泪了呢 POJ - 3661Running 区间DP
- FortiGuard 实验室报告:全球受攻击的IoT设备呈指数级增长
- C++:流类库与输入输出
- 汤姆大叔 深入理解JavaScript系列(20):《你真懂JavaScript吗?》答案详解 后六道题答案...
- Linux常用命令 一
- 明明的随机数冒泡排序c 语言,NOIP复赛 c++-明明的随机数(算法和原码参考)
- linux查看帮助信息,命令帮助信息的获取