:
>>> import avro
>>> import avro.schema
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'avro.schema'
>>> print(avro)
<module 'avro' (namespace)>
>>> print(avro.schema)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'avro' has no attribute 'schema'
规格:
deb9 x64,Python 3.6.4和avro-python3版本:1.8.2,pip 9.0.1
virtualenv已激活且avro已安装pip
是avro维护还是我应该使用fastavro,如何解决上述问题,无法运行quickstart
的基本示例答案 0 :(得分:0)
检查您的要求。
可能是avro==1.8.2
出现上述错误是出于此要求。
将要求更改为:
avro-python3==1.8.2
为我解决了这个问题。
使用pip install avro-python3
代替pip install avro