TypeError: Expected ‘Iterator’ as the return annotation for __iter__
of SMILESParser, but found typing.Any
最近运行一个使用torch_geometric包的代码时报错了,这个奇怪的错误,上网查了一下,发现好像是torch_geometric和torch版本不匹配的原因,我的torch1.10.1+cu113,将torch_geometric版本改到2.0即可。
pip uninstall torch_geometric
pip install torch_geometric==2.0
还可以安装扩展包,选择对应版本即可
链接: https://pytorch-geometric.com/whl/