参考以下说明: http://open-babel.readthedocs.io/en/latest/UseTheLibrary/Python_Pybel.html
从http://openbabel.org/wiki/Category:Installation安装了windows 64位版本的OpenBabel2.4.1之后,我通过pip安装了Openbabel和pybel。在
>>>pip install pybel
>>>pip install openbabel
我试图以sdf格式(文件名为mol1.sdf存在于同一目录中)来查找分子的分子量
python文件(测试.py)我创造了如下:
^{pr2}$以下是命令提示符中发生的情况:
>>> python test.py
Traceback (most recent call last):
File "test.py", line 2, in <module>
mol = pybel.readfile("sdf", "mol1.sdf").next()
AttributeError: 'module' object has no attribute 'readfile'
但是根据上面参考链接中的示例代码,有一个名为“readfile”的属性可以读取文件和格式。我错过什么了吗?谢谢
我发现我犯了一个错误。结果我没有为程序安装Python绑定v1.8。在
相关问题 更多 >
编程相关推荐