python - Windows和Python3.7.4下RDKit安装

标签 python python-3.x windows installation rdkit

如果 RDKit 安装起来不那么复杂,它可能是一个不错的软件包。 在SO上,有几个问题在安装RDKit时出现问题。 但是,在不同的操作系统或不同的环境中。

我的配置是: Win10,Python 3.7.4,pip已安装,PATH已设置,PYTHONPATH已设置。 通过 python -m pip install <package> 安装其他模块工作正常.

我知道 site建议使用 Anaconda 进行最快的安装。 但是,我没有也不想要 Anaconda。

关于webpage它说: “从以下位置获取适当的 Windows 二进制版本:https://github.com/rdkit/rdkit/releases”。 但是,没有最新版本的二进制文件。

这意味着,我必须从源代码构建它。我在犹豫,因为这个过程似乎非常复杂,许多额外的安装都有新问题和未知数,此外,对于第一次从源代码构建二进制文件的人来说,这些说明似乎已经过时且不完整。

所以,然后我尝试了一些 RDKit 的非官方二进制文件.

如果我解压它们并根据说明设置路径,我会收到此错误消息:

>>> from rdkit import Chem
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\xyz\Programs\RDKit\rdkit\__init__.py", line 2, in <module>
    from .rdBase import rdkitVersion as __version__
ImportError: DLL load failed: The specified module could not be found.

那么,最后我的问题是:

  • 如何使用上述配置正确安装 RDKit?
  • 缺少的指定 DLL 是什么?
  • 它在哪里期待和搜索它?
  • 这些 RDKit 3.6 二进制文件是否可能与 Python 3.7.4 不兼容?

我很确定这可能是一件“小”事(这里的路径或那里的检查),但我被卡住了。感谢您的任何提示。

更新:

显然,这不仅仅是一件“小”事。让这个工作的机会很可能非常低。 与此同时,我发现了这个:

https://github.com/rdkit/rdkit/issues/1812

https://github.com/rdkit/rdkit/issues/2389

如果rdkit的作者|写道(2019 年 4 月):

I would be happy to be able to do pip distributions of the RDKit, but to the best of my knowledge no one has managed to figure out how to make it actually work.

I'd be happy to accept a PR from someone who has figured this out, but I am not likely to have the time to do this myself anytime in the near future.

所以,如果有人觉得有能力实现这一点,请随意。 如果我想使用 RDKit,我将把时间花在其他事情上,或者必须切换到 Anaconda。

最佳答案

关于 webpage你链接有一个关于丢失的 DLLs 的部分:

“在 Win7 系统中,您可能会因缺少 DLL 而遇到麻烦,请参阅邮件列表中的一个主题:http://www.mail-archive.com/rdkit-discuss@lists.sourceforge.net/msg01632.html 您可以从此处下载缺少的 DLL:http://www.microsoft.com/en-us/download/details.aspx?id=5555

不确定这是否有帮助

关于python - Windows和Python3.7.4下RDKit安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57111030/

相关文章:

python - 比单个列一次跨数据框剥离空间的优雅方式

python - 优化 Python 中的函数以处理大块数据

python - 类型错误 : 'bool' object is not iterable

python - 如何使用face_recognition模块执行python .exe文件

python - 使用来自 VBscript 的参数调用 Python 脚本

Python Redhat 版本问题

windows - 使用 PowerShell 提升当前目录中的权限

c# - 如何使用 C# 将 CSV 数据粘贴到 Windows 剪贴板

bash - 从终端验证是否安装了 python 3

python - 用于伊辛模型的 python 中的嵌套循环